Documenting JavaScript Programs
JSDoc
JSDoc is an API documentation generator for JavaScript, similar to Javadoc. You add documentation comments directly to your source code, right alongside the code itself. The JSDoc tool will scan your source code and generate an HTML documentation website for you.
-
JSDoc grammars:
- PegJS grammar jsdoctypeparser/jsdoctypeparser/peg_src/jsdoctype.pegjs (opens in a new tab)
- PegJS hegemonic/catharsis/lib/parser.pegjs (opens in a new tab) or Google Closure Compiler and JSDoc type expressions.
jsdoc-to-markdown
jsdoc-to-markdown (opens in a new tab) generates markdown API documentation from jsdoc (opens in a new tab) annotated source code. Useful for injecting API docs into project README files.
1. Document your code using valid jsdoc comments.
/**
* A quite wonderful function.
* @param {object} - Privacy gown
* @param {object} - Security
* @returns {survival}
*/
function protection (cloak, dagger) {}
2. Run a command.
$ jsdoc2md example.js
3. Get markdown output.
## protection `(cloak, dagger) ⇒ <code>survival</code>`
A quite wonderful function.
**Kind**: global function
| Param | Type | Description |
| ------ | ------------------- | ------------ |
| cloak | `object` | Privacy gown |
| dagger | `object` | Security |
See also
- API documentation (opens in a new tab)
- The wiki (opens in a new tab) for example output, FAQs, tutorials, plugins, use with gulp/grunt etc.
Vuepress Autodoc Plugin
See https://bprinty.github.io/vuepress-plugin-autodoc/#overview (opens in a new tab)
Docco
How to Make Man pages
- Creating Man Pages in Markdown with Ronn (opens in a new tab)
- rtomayko/ronn (opens in a new tab)
- How to add man pages to your npm package (opens in a new tab)
The module documentation.js
!!!include(/topics/introduction-to-javascript/documentation-guide.md)!!!
References about Documentación.js
- documentation.js: User's Guide (opens in a new tab)
- documentation.js: Getting Started (opens in a new tab)