-
Notifications
You must be signed in to change notification settings - Fork 151
How to use with npm run
Lloyd Brookes edited this page Oct 9, 2016
·
2 revisions
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
- Home
- How jsdoc2md works
- Additional jsdoc tags supported
- Cherry picking which documentation appears in output
- Showcase ...
- Create ...
- How To ...
- How to use with npm run
- How to use with gulp
- How to create one output file per class
- How to document a AMD module
- How to document a CommonJS module (exports)
- How to document a CommonJS module (module.exports)
- How to document an ES2015 module (multiple named exports)
- How to document an ES2015 module (single default export)
- How to document Promises (using custom tags)
- How to document a ToDo list
- How to document ES2017 features
- How to document TypeScript
- The @typicalname tag
- Linking to external resources
- Param list format options
- Listing namepaths
- Troubleshooting