documentation.js 4 beta
Announcing documentation.js 4.0.0 beta! This version aims to stablize new features. The most noticable change will be the expanded and improved CLI commands:
documentation build
extracts and formats documentationdocumentation serve
provides an auto-reloading serverdocumentation lint
reviews files for inconsistenciesdocumentation readme
patches API documentation into a readme
documentation serve
and documentation readme
used to be a separate modules: dev-documentation
and Anand Thakker’s documentation-readme
. After finishing these modules, we realized that they were essential to using documentation.js and could be implemented more cleanly as part of the core, so we’re launching documentation.js as a multifunctional tool.
Much more flexible themes
Themes are now much more customizable. In documentation.js 3.x and before, themes were required to use Handlebars templates and produce a single page. In documentation.js 4.x and beyond, they are JavaScript modules that can use any template engine and produce any number of files. See the new theme documentation for details.
More precise traversal
Inference in 4.x is stricter than in 3.x: comments must be adjacent to the statements they document. This should make documentation generation much more predictable.
Support for the revealing module pattern
There’s new support for the JavaScript module pattern, implemented by Charlie Brown.
Try it out
You can install documentation as a CLI tool, or a dependency of your node.js module: it’s available on npm as the documentation
module, and on GitHub under documentationjs/documentation.