documon
Version:
A documentation system for mortals. Use with any language.
79 lines (41 loc) • 1.76 kB
Markdown
# Usage
Documon can be used within your existing Javascript-based project, or from the command line via Node (CLI)
## Project-based Usage
Install Documon:
npm install documon
... then build documentation from within your project using:
var docs = require("documon");
docs({
src : "path/to/src",
out : "put/docs/here",
name : "My Cool Project",
version : "1.0"
});
## CLI Usage
Documon can be run from command line via Node:
cd /path/to/documon
node ./index.js -h
# or (if you're cool)
node ./index -h
# or (if you're really, cool)
node . -h
Point Documon at your source folder:
node ./index.js "/path/to/source"
# Documon generates a "docs" folder parallel
# to your source. In the example above the
# "docs" folder ends up here:
/path/to/docs
To specify the output folder, set the the second argument to the folder
node ./index.js [source] [output]
__Example__
node ./index.js "/path/to/source" "/path/to/output/folder"
# ... places the "docs" folder here:
"/path/to/output/folder/docs"
> NOTE: For safety measures, a "docs" folder is always generated inside the output folder. Because each time docs are generated, the docs file is emptied. We empty the docs folder to prevent "stragglers" from collecting and building up over time. By creating and managing a "docs" folder, we can prevents wiping out everything within a folder Documon doesn't manage.
To explicitly set input/output paths, use the following flags
-i - Source file or folder.
-o - Output path.
Example
node ./index.js -i "/path/to/source" -o "/path/to/output/folder"
See the [Options](more.Options) for an in-depth look at all available options.
.