BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
Contributing to VisualEditor

Thank you for helping us develop VisualEditor!

This document describes how to report bugs, set up your development environment, run tests, and build documentation. It also provides the coding conventions we use in the project.

Bug reports

Please report bugs to using the VisualEditor project.

Running tests

VisualEditor's build scripts use the Grunt task runner. To install it make sure you have node and npm installed, then run:


Install Grunt command-line utility

$ npm install -g grunt-cli

Install VisualEditor's dev dependencies

$ npm install ```

To run the tests, use: ```sh $ grunt test ```

For other grunt tasks, see: ```sh $ grunt –help ```

To run the tests in a web browser, open tests/index.html.

Building documentation

VisualEditor uses JSDuck to process documentation comments embedded in the code. To build the documentation, you will need ruby, gem, and jsduck installed.

Installing ruby and gem

You're mostly on your own here, but we can give some hints for Mac OS X.

Installing Gem in Mac OS X

Ruby ships with OSX but may be outdated. Use Homebrew: ```sh $ brew install ruby ```

If you've never used gem before, don't forget to add the gem's bin to your PATH (howto).

Installing jsduck

Once you have gem, installing JSDuck is easy: ```sh $ gem install –user-install jsduck ```

Running jsduck

Creating the documentation is easy: ```sh $ cd VisualEditor $ npm run doc ```

The generated documentation is in the docs/ subdirectory. View the documentation in a web browser by opening docs/index.html.

Note that jsduck doesn't support live previews when browsing using the file: protocol; this only works when using HTTP/HTTPS.

VisualEditor Code Guidelines

We inherit the code structure (about whitespace, naming and comments) conventions from MediaWiki. See Manual:Coding conventions/JavaScript on

Git commit messages should follow the conventions described in

Documentation comments

In addition to the MediaWiki conventions for JSDuck:

We have the following custom tags:

  • Text
  • {Type} Optional text.
  • name

They should be used in the order as they are described here. Here's a slightly more complete list indicating their order between the standard tags.