Docker

A documentation generator built on the foundations of Docco and Docco-Husky.

The support available in Docco and Docco-Husky for larger projects consisting of many hundreds of script files was somewhat lacking, so I decided to create my own.

Take a look at this project's public page for an example of what it can do.

Installation

Simple: npm install -g docker

Usage

$ docker [options] [files ...]

Available options are:

If no file list is given, docker will run recursively on every file in the current directory

Any of the files given can also be directories, in which case it will recurse into them.

Folder structure inside the input directory is preserved into the output directory and file names are simply appended .html for the doc file

Examples

If you haven't installed with -g specified, replace docker with something like $(npm root)/docker/docker in all of the examples below.

Process every file in the current directory into "doc"

$ docker

Process files in "src" to "documents"

$ docker -i src -o documents

or:

$ docker -o documents src

or:

$ docker -o documents src/*

Note that in the first example, the contents of src will be mapped directly into documents whereas in the second and third examples, the files will be created inside documents/src

Generate Docker docs

This is the command I use to generate this project's documentation.

$ docker -o ../docker_gh-pages -c atelier-cave.light -s yes -I -u -x node_modules -w --extras fileSearch

Extras

The output of Docker is designed to be fairly lightweight, so doesn't include much other than the bare minimum to power the basic features. Optional extras like file searching and line jumping are therefore contained in there own files and can be turned on by a specific flag.

If you're viewing this on GitHub, take a look here; if you're looking at the Docker output, look here, for further explanation.

Colour Schemes

These are the styles available in highlight.js. See the highight.js demo for all available options. You should use the name of the CSS file for this option.

Important note

All files must be inside the input directory (specified by -i) or one of its descendant subdirectories. If they're not then various file paths in the output won't work properly and the file will probably get generated in the wrong place. Still, it's better than what it used to do, which was to get stuck in an infinite loop.