doco

The JavaScript documentation generator used in dojo, the node.js application server.

npm install doco
1 downloads in the last day
1 downloads in the last week
8 downloads in the last month

doco

The JavaScript documentation generator used in dojo. Totally technical, yet unstable but working. Contributors welcome!

Usage

npm install doco

JSON (default)

doco < sourcefile.js > docs.json

Emits raw parser results.

Markdown

doco -gen=markdown < sourcefile.js > DOCS.md

Generates GitHub-flavoured markdown with a TOC.

HTML

doco -gen=html < sourcefile.js > docs.html

Generates only the actual HTML portion of the docs from markdown, no html or head tags. So, chain it to include your own headers and footers to apply your own stylings, e.g.:

cat header.html > docs.html && doco -gen=html < sourcefile.js >> docs.html && cat footer.html >> docs.html

Creating custom generators

Take a look at the generators available in the gen/ directory. It's pretty straight forward.

API (generated with doco)

var doco = require("doco");
...

doco

doco

doco namespace.

doco.dox

Bundled / modified dox.

doco.marked

Bundled / modified marked.

doco.gen

Available generators inside the gen/ folder.

doco.doco(source, gen*)

Parses a source and returns the generated doco.

Name Type Description
source string Source contents
gen* (string ¦ function(Array):string) Generator to use. May be the name of a generator or a generator function.
returns string Generated doco

Examples

Credits

Based on customized version of dox by TJ Holowaychuk and marked by Christopher Jeffrey.

License

Apache License, Version 2.0

npm loves you