diff --git a/doc/cli/help.txt b/doc/cli/help.txt index 63f8c71..d2b6845 100644 --- a/doc/cli/help.txt +++ b/doc/cli/help.txt @@ -17,7 +17,8 @@ tools like forever.js. -v, --version ............ current nodemon version. -h, --help ............... you're looking at it. - --help ........... help on a specific feature. Try "--help topics" + --help ........... help on a specific feature. Try "--help topics". + -- ........... to tell nodemon stop slurping arguments. Note: if the script is omitted, nodemon will try to read "main" from package.json and without a nodemon.json, nodemon will monitor .js, .coffee, @@ -32,5 +33,6 @@ $ PORT=8000 nodemon --debug-brk server.js $ nodemon --exec python app.py $ nodemon --exec "make build" -e "styl hbs" + $ nodemon app.js -- -L For more details see http://github.com/remy/nodemon/ diff --git a/faq.md b/faq.md index 98bb48d..c0462e9 100644 --- a/faq.md +++ b/faq.md @@ -16,6 +16,16 @@ Create an nodemon.json file with the setting: This will leave the STDIN to your application rather than listening for the `rs` command to restart. +# My script arguments are being taken by nodemon + +Use the `--` switch to tell nodemon to ignore all arguments after this point. So to pass `-L` to your script instead of nodemon, use: + +``` +$ nodemon app.js -- -L -opt2 -opt3 +``` + +nodemon will ignore all script arguments after `--` and pass them to your script. + # Help! My changes aren't being detected! nodemon has three potential methods it uses to look for file changes. First, it polls using the find command to search for files modified within the last second. This method works on systems with a BSD based find (Mac, for example).