* fix: pass through execArgs from config
Also updating some deps and linting tweaks
* chore: add message on postinstall
Lost funds from gratipay and codesponsor 😢
Since in a server environment JSON files often contain settings,
nodemon should restart by default when the content of a JSON file is changed.
Closes#643
Previously, the --nodejs flag was being prepended if you had any
arguments prefixed with '--', even if they were intended for your
application. There is an additional problem where arguments intended for
node js need to be grouped into a single argument passed after --nodejs.
After this patch, any flag before your script is considered a nodejs
argument. These, along with any other exec arguments are bundled into a
single argument separated by spaces.
Fixes#530
- Also update tests to check end value, not individual parts
- Simplify tests to check actual output, rather than the pieces that make the output
- Remove redundant code: such a shame, it was cool code, but I'd rather remove it for simplicity and better support. Woot.
Full tests need to run to work out if this is okay to merge, but the logic is that we only go to the package.json for an executable IIF there's no script. If there's a script, then we shouldn't need to discover anything and we'll let the logic fall through the usual path (and usually default to node).
This commit removes the duplication that happened at the options and options.execOptions level. Now all exec related information lives in options.execOptions.
I've updated all the references and tests that referred to things like options.script, etc.
This also fixes the (new) bug with exec argments not being placed in the right position when the script is detected via a package (so it reads `node --debug app.js` - this is resolved in command.js (due to the flattening of the config).
I've also fixed a few tests that said they were passing, but actually should have failed (but didn't because I was mocking too much of the code).
It was losing quotes around arguments, and in fact only needs to capture the first element in the string as the exec, and the rest could be left as is (if I keep the `sh` method of execution).
Closes#418Closes#419
This version will handle quoted entities in the exec string or escaped spaces correctly, so the user can run:
--exec '"/bin/my cool app" {{filename}}'
Or
--exec '/bin/my\ cool\ app {{filename}}'
This will work both on the command line and from the API.
Fixes#333 and fixes#335. Amazingly Windows support always had the full process tree being killed, but this solves it for mac and linux now. My only grip is we have a new dependancy for the project, but I don't really think that's such a big deal.
Fixes#299 and fixes#308.
This means if you use nodemon to monitor a .js script, but explicitly watch another file (that isn't .js) then nodemon *will* restart as expected.
Now using minimatch to match globs to files that have changed. Logic orders the rules in order of specificity (i.e. deeper paths have higher specificity) and the file runs through the rules.