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.
npm install -g docker
$ docker [options] [files ...]
Available options are:
--input_dir: Path to input source directory. Defaults to current directory.
--output_dir: Path to output doc directory. Defaults to
--updated_files: If present, only process files that hav been changed.
--colour_scheme(yes, I'm British): Colour scheme to use. Colour schemes are as below.
--ignore_hidden: Ignore files and directories whose names begin with
--watch: Keep the process running, watch for changes on the directory, and process updated files.
--sidebar: Whether or not the sidebar should be opened by default in the output (defaults to yes, can be yes, no, true, false)
--exclude: Comma-separated list of paths to exclude. Supports basic
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
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"
Process files in "src" to "documents"
$ docker -i src -o documents
$ docker -o documents src
$ 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
Generate Docker docs
This is the command I use to generate this project's documentation.
- Output to a directory on the
gh-pagesbranch of this repo
- Use the "manni" colour scheme
- Ignore files starting with
- Only process updated files
- Exclude the node_modules directory
- Watch the directory for further changes as the code is updated.
$ docker -o ../docker_gh-pages -c manni -I -u -x node_modules --watch
These are exactly as in
pygmentize -L styles:
All files must be inside the input directory (specified by
-i) or one of its descendant subdirectories. If they're not then it'll just get horribly confused and get into an infinite loop. Which isn't nice.