Skip to content

Commit

Permalink
docs: reduce CLI output and add --help options
Browse files Browse the repository at this point in the history
Also restore missing -L CLI options.

Fixes #1160
  • Loading branch information
remy committed Dec 13, 2017
1 parent d9e93ad commit fa64cdc
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 22 deletions.
4 changes: 2 additions & 2 deletions doc/cli/authors.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Remy Sharp - author and maintainer
http://github.com/remy
http://twitter.com/rem
https://github.com/remy
https://twitter.com/rem

Contributors: https://github.com/remy/nodemon/graphs/contributors ❤︎

Expand Down
2 changes: 1 addition & 1 deletion doc/cli/config.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Typically the options to control nodemon are passed in via the CLI and are
listed under the default nodemon --help command.
listed under: nodemon --help options

nodemon can also be configured via a local and global config file:

Expand Down
19 changes: 5 additions & 14 deletions doc/cli/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,16 @@
-w, --watch dir........... watch directory "dir" or files. use once for
each directory or file to watch.
-i, --ignore ............. ignore specific files or directories.
-q, --quiet .............. minimise nodemon messages to start/stop only.
-V, --verbose ............ show detail on what is causing restarts.
-I, --no-stdin ........... don't try to read from stdin.
-C, --on-change-only ..... execute script on change only, not startup
--no-colors .............. disable color output
--signal <signal> ........ use specified kill signal instead of default (ex. SIGTERM)
-d, --delay n ............ debounce restart for "n" seconds.
--exitcrash .............. exit on crash, allows use of nodemon with daemon
tools like forever.js.
-v, --version ............ current nodemon version.
-h, --help ............... you're looking at it.
--help <topic> ........... help on a specific feature. Try "--help topics".
-- <your args> ........... to tell nodemon stop slurping arguments.

More options are available under: nodemon --help options

Note: if the script is omitted, nodemon will try to read "main" from
package.json and without a nodemon.json, nodemon will monitor .js, .mjs, .coffee,
and .litcoffee by default.

To learn more about nodemon.json config: nodemon --help config
For advanced nodemon configuration use nodemon.json: nodemon --help config
See also the sample: https://github.com/remy/nodemon/wiki/Sample-nodemon.json

Examples:
Expand All @@ -35,6 +26,6 @@
$ nodemon -w ../foo server.js apparg1 apparg2
$ nodemon --exec python app.py
$ nodemon --exec "make build" -e "styl hbs"
$ nodemon app.js -- --inspect
$ nodemon app.js -- --config # pass config to app.js

For more details see http://github.com/remy/nodemon/
For more details see https://github.com/remy/nodemon/
34 changes: 34 additions & 0 deletions doc/cli/options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

Configuration
--config <file> .......... alternate nodemon.json config file to use
--exitcrash .............. exit on crash, allows nodemon to work with other watchers
-i, --ignore ............. ignore specific files or directories
--no-colors .............. disable color output
--signal <signal> ........ use specified kill signal instead of default (ex. SIGTERM)
-w, --watch dir........... watch directory "dir" or files. use once for each
directory or file to watch

Execution
-C, --on-change-only ..... execute script on change only, not startup
--cwd <dir> .............. change into <dir> before running the script
-e, --ext ................ extensions to look for, ie. "js,jade,hbs"
-I, --no-stdin ........... nodemon passes stdin directly to child process
-x, --exec app ........... execute script with "app", ie. -x "python -v"
-- <your args> ........... to tell nodemon stop slurping arguments

Watching
-d, --delay n ............ debounce restart for "n" seconds
-L, --legacy-watch ....... use polling to watch for changes (typically needed
when watching over a network/Docker)
-P, --polling-interval ... combined with -L, milliseconds to poll for (default 100)

Information
--dump ................... print full debug configuration
-h, --help ............... default help
--help <topic> ........... help on a specific feature. Try "--help topics"
-q, --quiet .............. minimise nodemon messages to start/stop only
-v, --version ............ current nodemon version
-V, --verbose ............ show detail on what is causing restarts


> Note that any unrecognised arguments are passed to the executing command.
4 changes: 3 additions & 1 deletion doc/cli/topics.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

options .................. show all available nodemon options
config ................... default config options using nodemon.json
authors .................. contributors to this project
logo ..................... <3
whoami ................... I, AM, NODEMON \o/

Please contribute http://github.com/remy/nodemon/
Please support https://github.com/remy/nodemon/
4 changes: 0 additions & 4 deletions lib/cli/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ function nodemonOption(options, arg, eatNext) {
options.quiet = true;
} else

if (arg === '--hidden') { // TODO document this flag?
options.hidden = true;
} else

if (arg === '--config') {
options.configFile = eatNext();
} else
Expand Down

0 comments on commit fa64cdc

Please sign in to comment.