Skip to content

Commit

Permalink
Better doc-generation, document the doc commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mde committed Sep 10, 2020
1 parent a1c9c10 commit 9f69c0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ Therefore, we do not recommend using this shortcut.
is the included content.

This project uses [JSDoc](http://usejsdoc.org/). For the full public API
documentation, clone the repository and run `npm run doc`. This will run JSDoc
documentation, clone the repository and run `jake doc`. This will run JSDoc
with the proper options and output the documentation to `out/`. If you want
the both the public & private API docs, run `npm run devdoc` instead.
the both the public & private API docs, run `jake devdoc` instead.

### Tags

Expand Down
14 changes: 10 additions & 4 deletions jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,18 @@ task('minify', function () {
console.log('Minification completed.');
});

desc('Generates the EJS API docs');
desc('Generates the EJS API docs for the public API');
task('doc', function (dev) {
jake.rmRf('out');
var p = dev ? '-p' : '';
exec('./node_modules/.bin/jsdoc ' + p + ' -c jsdoc.json lib/* docs/jsdoc/*');
console.log('Documentation generated.');
exec('./node_modules/.bin/jsdoc --verbose -c jsdoc.json lib/* docs/jsdoc/*');
console.log('Documentation generated in ./out.');
});

desc('Generates the EJS API docs for the public and private API');
task('devdoc', function () {
jake.rmRf('out');
exec('./node_modules/.bin/jsdoc --verbose -p -c jsdoc.json lib/* docs/jsdoc/*');
console.log('Documentation generated in ./out.');
});

desc('Publishes the EJS API docs');
Expand Down

0 comments on commit 9f69c0a

Please sign in to comment.