JSDoc is a documentation generator similar to JavaDoc or PHPDoc.
JSDoc
Install JSDoc with npm install -g jsdoc
.
Generate docs with jsdoc **/*.js
.
YUIDoc
YUIDoc is suitable for generate documentation for YUI, a JavaScript library, and no longer actively maintained.
It can only list modules and classes on the homepage, which is not very suitable for general purpose jsdoc.
Install it with npm install -g yuidocjs
.
Run it with yuidoc .
.
It creates a folder named "out" by default in the current directory.
Open the index.html in "out" folder to see the doc.
Editor
vim with scrooloose/nerdcommenter.
Use <leader>cs
to add block comment.
But note that the block generated by this plugin is started by /*
, which is invalid for jsdoc and yuidoc.
You have to add an asterisk behind it as /**
.