Skip to content

Preparing for documentation.js 4!

Pre-release
Pre-release
Compare
Choose a tag to compare
@tmcw tmcw released this 24 Jan 21:37
· 812 commits to master since this release

Revitalized documentation.js command line interface!

The documentation utility now takes commands:

  • documentation build extracts and formats documentation
  • documentation serve provides an auto-reloading server (#236)
  • documentation lint reviews files for inconsistencies
  • documentation readme patches API documentation into a readme (#313 by @anandthakker)

This functionality was previously included in dev-documentation and has
been folded into documentation proper.

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

/** Foo */
function Foo() {
  /** Test */
  function bar() {}
  return {
    bar: bar
  };
}

New support for the JavaScript module pattern!
This was implemented in #324
by Charlie Brown.

Breaking changes