- Check for existing issues and confirm that it has not been already fixed in the master branch
- Fork the repo and clone it locally
- Create a new branch for your contribution
- Add tests
- Running with mocha under node tests run with
npm test
npm run test_cover
will generate a coverage report under thecoverage
directory- Running with karma using browser tests run with
npm run test_browser
- Push to your fork and submit a pull request
npm prune
npm install
npm outdated --depth=0
- Update version numbers repeat 2-4, until only three packages are listed
socket.io
socket.io-client
[email protected]
- Update superagent in
src/client/lib/superagent
seesrc/client/lib/superagent/UPGRADE
- Update q
cp node_modules/q/q.js src/client/lib/q/q.js
npm run
will print all available commandsnpm start
starts the webgme web servernode node_modules\nodemon\bin\nodemon.js src\bin\start_server.js
restarts server on file changesnode node_modules/plato/bin/plato -r -d report -l .jshintrc -t "WebGME" -x "(src\\client\\(lib|bower_components)\\.*|src\\server\\middleware\\executor\\worker\\node_modules\\.*|src\\client\\js\\Merge\\angular.min.js|.*classes.build.js|.*jszip.js|.*sax.js|.*jjv.js|.*sha1.js|.*canon.js|.*ejs.js|.*decoratorSVG.js)" src
static code analysis
For any commands the DEBUG
environment variable can be set. Examples are given for npm test
command.
Platform specifics:
*nix
$ DEBUG=* npm test
Windows
set DEBUG=* & npm test
Examples are given for Windows:
set DEBUG=gme:* & npm test
set DEBUG=gme:*,-gme:*worker* & npm test
set DEBUG=gme:*storage*,superagent* & npm test
set DEBUG=gme:*storage*,socket-io* & npm test
set DEBUG=gme:standalone*,express* & npm test
set DEBUG=gme:*plugin* & npm test
To test and develop the API use the following commands
node node_modules\aglio\bin\aglio.js --input src\server\api\Readme.md --server
live preview of the online documentation of the api blueprintnode node_modules\api-mock\bin\api-mock src\server\api\Readme.md
serves the api according the blueprint
Note: when you have finished verify that the api documentation is available if you run the webgme server at http://localhost:8888/developer/api
- Configure your editor to use
.jshintrc
and.jscsrc
- Don't update the version in
package.json
, the webgme package maintainers will do it
/*jshint node: true*/
/*jshint browser: true*/
/*jshint node: true, mocha: true*/
Always declare your globals at the top of the source.
/*globals define, requirejs*/
Use JSDoc syntax to annotate source code with documentation, eg. specify authors as:
/**
* @author <your_github_username> / https://github.com/<your_github_username>
*/
This section is for maintainers of webgme. Update CHANGELOG.md file using github_changelog_generator (Note: a single run eats up to 1500 requests, the rate limit is 5000/hour)
- New release:
github_changelog_generator --future-release <next_release> -t <your_github_token>
- Generating for existing releases:
github_changelog_generator --no-unreleased -t <your_github_token>
- For more information see:
github_changelog_generator --help