From 9f69c0a1766dffd5e99db4931d45bfb90ab30e5c Mon Sep 17 00:00:00 2001 From: mde Date: Thu, 10 Sep 2020 08:20:56 -0700 Subject: [PATCH] Better doc-generation, document the doc commands --- README.md | 4 ++-- jakefile.js | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 265ebfed..009809c1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/jakefile.js b/jakefile.js index 271c167d..5d4a4feb 100644 --- a/jakefile.js +++ b/jakefile.js @@ -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');