Permalink
Browse files

Update cli args

  • Loading branch information...
1 parent 8bb83ea commit dc67866b55ec5f0d01dd313aa36e237cc1c4dbb0 @ixti ixti committed Jul 2, 2012
Showing with 25 additions and 19 deletions.
  1. +13 −10 README.md
  2. +12 −9 lib/ndoc/cli.js
View
@@ -37,23 +37,26 @@ If not - try [nvm](https://github.com/creationix/nvm).
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
- --exclude PATTERN Glob patterns of filenames to exclude. You
- can use wildcards (?, *, **) in this
- patterns. See [minimatch] module for
- detailed information.
- -o PATH, --output PATH Resulting file(s) location
- --use PLUGIN Use custom plugin
- -r RENDERER, --render RENDERER Documentation renderer
+ --exclude PATTERN Glob patterns of filenames to exclude (you
+ can use wildcards: ?, *, **).
+ -o PATH, --output PATH Resulting file(s) location.
+ --use PLUGIN Load custom plugin.
+ -r RENDERER, --render RENDERER Documentation renderer (html, json). More
+ can be added by custom plugins.
--link-format FORMAT View sources link format. You can use
`{file}` and `{line}` and any of `{package.
- *}` variables for interpolation.
+ *}` variables for interpolation. DEFAULT:
+ `{file}#L{line}`
-t TEMPLATE, --title TEMPLATE Documentation title template. You can use
any of `{package.*}` variables for
- interpolation.
+ interpolation. DEFAULT: `{package.name}
+ {package.version} API documentation`
--show-all By default `internal` methods/properties
are not shown. This trigger makes ndoc show
all methods/properties
- --package PACKAGE Read specified package.json FILE.
+ --package PACKAGE Read specified package.json FILE. When not
+ specified, read ./package.json if such file
+ exists.
--index FILE Index file
--gh-ribbon URL Add "Fork me on GitHub" ribbon with given
URL. You can use any of `{package.*}`
View
@@ -88,9 +88,8 @@ cli.addArgument(['paths'], {
cli.addArgument(['--exclude'], {
- help: 'Glob patterns of filenames to exclude. You can use wildcards ' +
- '(?, *, **) in this patterns. See [minimatch] module for ' +
- 'detailed information.',
+ help: 'Glob patterns of filenames to exclude ' +
+ '(you can use wildcards: ?, *, **).',
dest: 'exclude',
metavar: 'PATTERN',
action: 'append',
@@ -99,14 +98,14 @@ cli.addArgument(['--exclude'], {
cli.addArgument(['-o', '--output'], {
- help: 'Resulting file(s) location',
+ help: 'Resulting file(s) location.',
metavar: 'PATH',
defaultValue: 'doc'
});
cli.addArgument(['--use'], {
- help: 'Use custom plugin',
+ help: 'Load custom plugin.',
metavar: 'PLUGIN',
action: 'append',
defaultValue: []
@@ -115,7 +114,8 @@ cli.addArgument(['--use'], {
cli.addArgument(['-r', '--render'], {
dest: 'renderer',
- help: 'Documentation renderer',
+ help: 'Documentation renderer (html, json). More can be added by ' +
+ 'custom plugins.',
choices: function () { return _.keys(renderers).join(','); },
metavar: 'RENDERER',
action: 'store+lazyChoices',
@@ -125,7 +125,8 @@ cli.addArgument(['-r', '--render'], {
cli.addArgument(['--link-format'], {
help: 'View sources link format. You can use `{file}` and `{line}` ' +
- 'and any of `{package.*}` variables for interpolation.',
+ 'and any of `{package.*}` variables for interpolation. ' +
+ 'DEFAULT: `{file}#L{line}`',
dest: 'linkFormat',
metavar: 'FORMAT',
defaultValue: '{file}#L{line}'
@@ -134,7 +135,8 @@ cli.addArgument(['--link-format'], {
cli.addArgument(['-t', '--title'], {
help: 'Documentation title template. You can use any of ' +
- '`{package.*}` variables for interpolation.',
+ '`{package.*}` variables for interpolation. ' +
+ 'DEFAULT: `{package.name} {package.version} API documentation`',
metavar: 'TEMPLATE',
defaultValue: '{package.name} {package.version} API documentation'
});
@@ -150,7 +152,8 @@ cli.addArgument(['--show-all'], {
cli.addArgument(['--package'], {
- help: 'Read specified package.json FILE.',
+ help: 'Read specified package.json FILE. When not specified, read ' +
+ './package.json if such file exists.',
dest: 'package',
action: 'store+readJSON',
defaultValue: (function () {

0 comments on commit dc67866

Please sign in to comment.