Documentation

A documentation system so good, you'll actually write documentation

Module Friendly

Traverses node & CommonJS require() calls to automatically document the code your module exposes.

Beautiful Docs

Stop writing documentation in Markdown. Instead, write it in the standard JSDoc format and produce beautiful output as JSON, HTML, Markdown, and Docsets from a single source.

All the Code

Supports popular ES6 functionality, so you can use future-JavaScript and still produce great documentation. Works with client or server side code, with any kind of dependency and require system. With the polyglot option, you can even document C++ code - it's awesome for native nodejs modules.


Use It

Writing Documentation

Documentation has a first-class environment for writing new documentation, so that you can live-preview generated documentation as you edit the code's JSDoc comments. This is called dev-docmentation. To install it, you'll need node.js.

$ npm install -g dev-documentation

Then just run the command dev-documentation with no arguments to document everything in the current directory, or with a specific filename to document just one file.

$ cd my-project
$ dev-documentation

Node.js

Install

$ npm install -g documentation

Usage

$ documentation --help
$ documentation file.js -f md > API.md

The documentation module also has a great node-facing API.

Gulp

Install

$ npm install gulp-documentation

In your gulpfile

var gulp = require('gulp');
var documentation = require('gulp-documentation');
gulp.task('documentation', function () {
  gulp.src('./index.js')
    .pipe(documentation({ format: 'md' }))
    .pipe(gulp.dest('md-documentation'));
});