-
Notifications
You must be signed in to change notification settings - Fork 3
Contributing
Contributing to a2 is easy:
- Fork a2 on http://github.com/e-ucm/a2
- Hack away and send a pull request on Github!
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 MongoDB and Redis daemons running and only then run npm test
. If all tests are passed you can launch the service with npm start
and check out http://localhost:3000
(3000 is the port by default).
npm run fast-setup
should have created an administrator with the root/root
credentials (by default) that you can use to log into the system.
The default values can be changed in the fast-setup.
You should take a look at a more detailed deployment guide.
If you modify a public API, or add a new one, make sure to correctly document these changes with the APIDOCJS format, this will automatically generate the API documentation when the pull request is merged and will be available here.
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 a2 is licensed under the Apache 2.0 license before you decide to do code contributions.
If you work on a2 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 works before sending us the pull request, though npm test
is preferred.
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. Curly braces may be omitted if it does not hurt readability.
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.
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.
a2 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.