contributing page DocumentJS.guides.contributing source Learn how to contribute to DocumentJS. Developing To develop DocumentJS, fork and clone DocumentJS. Make sure you have NodeJS installed. Then: Install npm modules > npm install Run tests: > npm test Code Organization DocumentJS's functionality and code are broken down into the following folders within documentjs/lib: find - Gets each file that should be processed. process - Converts comments and files into a docObject and puts every docObject in the docMap. tags - Tags used by process to add properties to a docObject. generators/html - Generates an HTML site given a docMap. This process is futher broken down into: generators/html/build - Compile the templates, static resources, and mustache helpers used to generate the site. generators/html/write - Uses the compiled templates, static resources, and helpers to write out the site. generate - Given options, coordinates between find and the html generator to produce a site. configure - Reads documentjs.json and calls out to modules in the previous folders. Testing To run all tests, run: > npm test This runs mocha on test.js like: > mocha test.js --reporter spec test.js require's other test files within lib. Website and Documentation DocumentJS's gh-pages branch contains documentjs.com's code. It uses DocumentJS to produce the website. The best way to edit the docs is to: Fork/Clone https://github.com/bitovi/documentjs/tree/gh-pages next to the version of documentjs you want to be documented: documentjs> cd .. > git clone email@example.com:bitovi/documentjs -b gh-pages documentjs.com Install NPM dependencies: > cd documentjs.com documentjs.com> npm install Generate the entire site with: documentjs.com> npm run-script documentjs Update the site with changes in your local documentjs. Change the version number 0.0.0 accordingly: documentjs.com> node node_modules/.bin/documentjs 0.0.0@../documentjs Edit source in documentjs. Regenerate site and check changes: documentjs.com> node node_modules/.bin/documentjs 0.0.0@../documentjs Check in and push changes to documentjs. Check in and push gh-pages branch changes.