Skip to content

Commit fa64cdc

Browse files
committed
docs: reduce CLI output and add --help options
Also restore missing -L CLI options. Fixes #1160
1 parent d9e93ad commit fa64cdc

File tree

6 files changed

+45
-22
lines changed

6 files changed

+45
-22
lines changed

doc/cli/authors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Remy Sharp - author and maintainer
3-
http://github.com/remy
4-
http://twitter.com/rem
3+
https://github.com/remy
4+
https://twitter.com/rem
55

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

doc/cli/config.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

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

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

doc/cli/help.txt

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

14+
More options are available under: nodemon --help options
15+
2516
Note: if the script is omitted, nodemon will try to read "main" from
2617
package.json and without a nodemon.json, nodemon will monitor .js, .mjs, .coffee,
2718
and .litcoffee by default.
2819

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

3223
Examples:
@@ -35,6 +26,6 @@
3526
$ nodemon -w ../foo server.js apparg1 apparg2
3627
$ nodemon --exec python app.py
3728
$ nodemon --exec "make build" -e "styl hbs"
38-
$ nodemon app.js -- --inspect
29+
$ nodemon app.js -- --config # pass config to app.js
3930

40-
For more details see http://github.com/remy/nodemon/
31+
For more details see https://github.com/remy/nodemon/

doc/cli/options.txt

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
Configuration
3+
--config <file> .......... alternate nodemon.json config file to use
4+
--exitcrash .............. exit on crash, allows nodemon to work with other watchers
5+
-i, --ignore ............. ignore specific files or directories
6+
--no-colors .............. disable color output
7+
--signal <signal> ........ use specified kill signal instead of default (ex. SIGTERM)
8+
-w, --watch dir........... watch directory "dir" or files. use once for each
9+
directory or file to watch
10+
11+
Execution
12+
-C, --on-change-only ..... execute script on change only, not startup
13+
--cwd <dir> .............. change into <dir> before running the script
14+
-e, --ext ................ extensions to look for, ie. "js,jade,hbs"
15+
-I, --no-stdin ........... nodemon passes stdin directly to child process
16+
-x, --exec app ........... execute script with "app", ie. -x "python -v"
17+
-- <your args> ........... to tell nodemon stop slurping arguments
18+
19+
Watching
20+
-d, --delay n ............ debounce restart for "n" seconds
21+
-L, --legacy-watch ....... use polling to watch for changes (typically needed
22+
when watching over a network/Docker)
23+
-P, --polling-interval ... combined with -L, milliseconds to poll for (default 100)
24+
25+
Information
26+
--dump ................... print full debug configuration
27+
-h, --help ............... default help
28+
--help <topic> ........... help on a specific feature. Try "--help topics"
29+
-q, --quiet .............. minimise nodemon messages to start/stop only
30+
-v, --version ............ current nodemon version
31+
-V, --verbose ............ show detail on what is causing restarts
32+
33+
34+
> Note that any unrecognised arguments are passed to the executing command.

doc/cli/topics.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

2+
options .................. show all available nodemon options
23
config ................... default config options using nodemon.json
34
authors .................. contributors to this project
5+
logo ..................... <3
46
whoami ................... I, AM, NODEMON \o/
57

6-
Please contribute http://github.com/remy/nodemon/
8+
Please support https://github.com/remy/nodemon/

lib/cli/parse.js

-4
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@ function nodemonOption(options, arg, eatNext) {
137137
options.quiet = true;
138138
} else
139139

140-
if (arg === '--hidden') { // TODO document this flag?
141-
options.hidden = true;
142-
} else
143-
144140
if (arg === '--config') {
145141
options.configFile = eatNext();
146142
} else

0 commit comments

Comments
 (0)