Skip to content
Cristina Alonso edited this page Oct 4, 2016 · 3 revisions

Contributing to rage-analytics-frontend is easy:

Running & Testing

After forking the repository you must execute the following command: npm install && npm run fast-setup.

This will generate the necessary configuration files for running and testing the module. In order to check if everything works properly you must have A2 and Analytics Backend modules up and running. Afterwards, you can launch the service with npm start and check out http://localhost:3350 (3350 is the default port and it can be changed in the fast-setup).

You should take a look at a more detailed deployment guide.

API Changes & Additions

If you modify an existing feature or add a new one, make sure to correctly document these changes.

Don't forget to add the proper tests to the recent changes and additions. Our tests are located in /tests folder and are executed using mocha and shouldjs.

Keep in mind that rage-analytics-frontend is licensed under the Apache 2.0 license before you decide to do code contributions.

JSHint

If you work with rage-analytics-frontend code, we require you to use the JSHint rules located in the root directory of the repository. With WebStorm you can easily enable JSHint checking. You can also execute npm run lint to do a fast check and see if everything is ok before sending us the pull request, though npm test is preferred.

Code Style

We mostly follow the usual Node Java Script Style, and so should you.

A few things we'd rather not like to see:

  • Underscores in any kind of identifier
  • Hungarian notation
  • Prefixes for fields or arguments
  • Curly braces on new lines

If you modify an existing file, follow the style of the code in there.

If you create a new JavaScript file, please add at least some documentation that explains the usage and scope of the file. You can omit documentation for methods that are self-explanatory.

Git

Pull requests for the master repository will be checked by at least one core contributor before inclusion. We may reject your pull requests to master if we do not deem them to be ready or fitting. Please don't take offense in that case. We need to make sure things stay somewhat sane and stable.

rage-analytics-frontend uses a forked public project methodology. Here is a concise tutorial to help you get acquainted with the relevant Git commands for this project type.

Before you leave check out this Programming Best Practices Quotes for developers from around the web.

Clone this wiki locally