How to use with npm run - jsdoc2md/jsdoc-to-markdown GitHub Wiki
This is the most lightweight way to add the task - no additional task-running software required. First:
$ npm install jsdoc-to-markdown --save-dev
Then, in the "scripts"
section of package.json
, add a docs
task. For example:
{
"scripts": {
"docs": "jsdoc2md lib/*.js > api.md"
}
}
Now, project documentation is generated like so:
$ npm run docs