Skip to content

Commit

Permalink
docs(readme, usage): updated help command/message (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
irgendwr authored and tmcw committed Jan 13, 2018
1 parent 4bb2047 commit f0c3227
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 46 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -47,7 +47,7 @@ $ npm install -g documentation

This installs a command called `documentation` in your path, that you can
point at [JSDoc](http://usejsdoc.org/)-annotated source code to generate
human-readable documentation. First run `documentation` with the `-h`
human-readable documentation. First run `documentation` with the `--help`
option for help:

```sh
Expand Down
94 changes: 49 additions & 45 deletions docs/USAGE.md
Expand Up @@ -7,56 +7,60 @@ $ npm install -g documentation
```

`documentation` then installs a command called `documentation`. Run it with
`-h` to get help.
`--help` or `--help <command>` to get help.

```sh
Usage: documentation <command> [options]

Commands:
build build documentation
serve generate, update, and display HTML documentation
lint check for common style and uniformity mistakes
readme inject documentation into your README.md
```
$ documentation --help build
Options:
--help Show help [boolean]
--version Show version number [boolean]
--shallow shallow mode turns off dependency resolution, only
processing the specified files (or the main script
specified in package.json) [boolean] [default: false]
--config, -c configuration file. an array defining explicit sort order
--external a string / glob match pattern that defines which external
modules will be whitelisted and included in the generated
documentation. [default: null]
--extension, -e only input source files matching this extension will be
parsed, this option can be used multiple times.
--private, -p generate documentation tagged as private
--version Show version number [boolean]
--help Show help [boolean]
--theme, -t specify a theme: this must be a valid theme module
--project-name project name. by default, inferred from
package.json
--project-version project version. by default, inferred from
package.json
--project-homepage project homepage. by default, inferred from
package.json
--watch, -w watch input files and rebuild documentation when
they change [boolean]
--markdown-toc include a table of contents in markdown output
[boolean] [default: true]
--shallow shallow mode turns off dependency resolution, only
processing the specified files (or the main script
specified in package.json)
[boolean] [default: false]
--access, -a Include only comments with a given access level, out of
private, protected, public, undefined. By default,
public, protected, and undefined access levels are
included
[choices: "public", "private", "protected", "undefined"]
--github, -g infer links to github in documentation [boolean]
--infer-private Infer private access based on the name. This is a regular
expression that is used to match the name [string]
--document-exported Generate documentation for all exported bindings and
members even if there is no JSDoc for them
--config, -c configuration file. an array defining explicit sort
order [string]
--no-package, --np dont find and use package.json for project-
configuration option defaults
[boolean] [default: false]
--sort-order The order to sort the documentation
--external a string / glob match pattern that defines which
external modules will be whitelisted and included
in the generated documentation. [default: null]
--require-extension, --re additional extensions to include in require() and
import's search algorithm.For instance, adding .es5
would allow require("adder") to find "adder.es5"
--parse-extension, --pe additional extensions to parse as source code.
--private, -p generate documentation tagged as private
[boolean] [default: false]
--access, -a Include only comments with a given access level,
out of private, protected, public, undefined. By
default, public, protected, and undefined access
levels are included
[array] [choices: "public", "private", "protected", "undefined"]
--github, -g infer links to github in documentation [boolean]
--infer-private Infer private access based on the name. This is a
regular expression that is used to match the name
[string]
--document-exported Generate documentation for all exported bindings
and members even if there is no JSDoc for them
[boolean] [default: false]
--sort-order The order to sort the documentation
[choices: "source", "alpha"] [default: "source"]
--theme, -t specify a theme: this must be a valid theme module
--name project name. by default, inferred from package.json
--watch, -w watch input files and rebuild documentation when they
change [boolean]
--project-version project version. by default, inferred from package.json
--output, -o output location. omit for stdout, otherwise is a filename
for single-file outputs and a directory name for
multi-file outputs like html [default: "stdout"]
--output, -o output location. omit for stdout, otherwise is a
filename for single-file outputs and a directory
name for multi-file outputs like html
[default: "stdout"]
--format, -f [choices: "json", "md", "remark", "html"] [default: "json"]

Examples:
documentation build foo.js -f md > parse documentation in a file and
API.md generate API documentation as
Markdown
```

0 comments on commit f0c3227

Please sign in to comment.