The following options are available for both Command Line (CLI) and native JS processing:
| cli flag | js prop | default | description |
|---|---|---|---|
| -i | src | Path to source file or folder. | |
| -o | out | parallel to source folder | Path to build docs into. |
| -n | name | Name of your project / docs (displayed on the home page) | |
| -v | version | Version of your project / docs (displayed on the home page) | |
| -t | template | Path to template folder | |
| -l | launch | false | Launch docs in browser when done |
| -p | false | Print activity to the console (verbose). | |
| -e | sourceExt | "js" | Extension(s) to parse. Space delimit multiple extensions |
| -d | dumpData | false | Dumps intermediary data into the "docs/_data" folder. |
| -m | more | "More docs" folder containing additional documentation. | |
| -g | ignore | An array of files/folders to ignore. See "Ignoring Files" section below. | |
| -a | docBegin | /** | Comment begin string |
| -z | docEnd | */ | Comment end string |
| -x | indexShortcutName | __LAUNCH.html | Index shortcut name (so the file will appear at the top of the folder list so you don't have to scroll and poke around to find the "index.html" file). |
| -q | moreQuirkDelimiter | . | More quirk delimiter. The character(s) use to seperate the "more" page numbering system from page titles. |
| -y | gati | Google Analytics Tracking ID. If present pages will include tracking code. |
var docs = require("documon");
docs({
name : "My Cool Project",
version : "1.0",
src : "path/to/src",
out : "put/docs/here",
more : "path/to/more/folder",
template : "path/to/template/folder",
launch : true,
quiet : false,
sourceExt : ["js", "jsx", "php"],
dumpData : true,
ignore : ["**/*.md", "/path/to/example/**"],
gati : "UA-106684927-1"
});
cd /path/to/documon
node ./index.js -l -p -d -i "path/to/src" -o "put/docs/here" -n "My Cool Project" -v "1.0" -t "path/to/template/folder" -e "js jsx php" -m "path/to/more/folder"
We're using a simple "indexOf" to match for ignores, which is designed for speed to just deal with file/folder full-path matching, or word matching. Sorry no globs.
To include more than one file/folder with CLI, use a semicolon delimted list.
node ./index -g "foo; bar"