Documenter

Generate documentation for your JavaScript or Typescript projects!
Includes support for API reference docs generated automatically from code comments, as well as Markdown guides.
Documenter does not generate HTMl or any other kind of rendered output - it only extracts the documentation from your codebase and supplies it in a structured, consistent format for you to render as you wish.
Used by the Denali CLI to generate documentation for Denali projects, but it's not tied to Denali projects only.
Usage
You can use the extracter directly:
import { Extracter } from 'documenter';
let extracter = new Extracter({
dir: process.cwd(),
pagesDir: 'guides',
sourceDirs: [ 'src' ],
projectName: 'typescript-project',
projectVersion: '1.0.0'
});
let docs = extracter.extract();
Or, if you happen to be using Broccoli, you can use the Broccoli plugin:
import { ExtracterTree } from 'documenter';
let extracter = new ExtracterTree(inputTree, {
pagesDir: 'guides',
sourceDirs: [ 'src' ],
projectName: 'typescript-project',
projectVersion: '1.0.0'
});
For an example of what the final docs structure looks like, check the test output helper file.