Commit Graph

21 Commits

Author SHA1 Message Date
Remy Sharp
9651ab88b0 Escape exec *args* only if space
This matches npm's functionality. It's also been tested against the "some\"file" test, etc. It's hard too...and late.
2015-01-14 22:45:45 +00:00
Remy Sharp
b70b81612c Removed script, exec, ext from options
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).
2015-01-03 15:35:11 +00:00
Remy Sharp
b905ffae7d Fixed #448 - but failing other tests WIP
[skip ci]

Currently failing tests around handling of spaces in exec arguments.
2015-01-01 21:39:10 +00:00
Remy Sharp
ee35ef8347 Fixed exec parser
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).
2015-01-01 20:50:59 +00:00
Remy Sharp
8e3ba1c662 Fixed string interpolation with array exec 2014-12-09 12:24:50 +00:00
Remy Sharp
30a0603744 nodemon api support array for exec + tests 2014-12-09 11:25:37 +00:00
Remy Sharp
acf4d61c79 Correctly parse exec when there's spaces
Closes #418
Closes #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.
2014-12-08 09:16:16 +00:00
Remy Sharp
6adea0e893 Tests to show failing support 2014-12-08 08:31:47 +00:00
Remy Sharp
66e71d6b64 Fixes #383
Ensure we look at the package last, after reading cli options and user prefs via nodemon.json
2014-12-05 22:52:06 +00:00
Remy Sharp
7901854408 Ensure *nix kills entire process tree.
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.
2014-05-12 22:41:26 +01:00
Remy Sharp
641eb96cf5 -w <single file> ignores extension filter
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.
2014-03-19 15:33:35 +00:00
Remy Sharp
f636bc16f5 execMap uses script ext to lookup. Fixes #265
+ tests
2014-01-16 22:52:39 +00:00
Remy Sharp
7d4c8c14bc cli takes priority over execMap 2014-01-15 14:14:31 +00:00
Remy Sharp
483e70283e Pass non-nodemon args *in order* to exec. Fixes #263 2014-01-15 14:11:56 +00:00
Remy Sharp
bfc4ac1c4d Required nodemon accepts env to pass to spawned process
See https://github.com/ChrisWren/grunt-nodemon/pull/29 for example/request
2014-01-15 14:07:36 +00:00
Remy Sharp
08c758f884 Rule matching tested and passing 2014-01-05 00:45:38 +00:00
Remy Sharp
7959c5bf00 Refactor watch & ignore logic in favour of monitor
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.
2014-01-03 18:27:24 +00:00
Remy Sharp
30a4a192f5 Docs and 1.0.0 release. Whoop whoop! 2013-12-29 22:50:02 +00:00
Remy Sharp
999f87eeda Support for execMap #195 and tests 2013-12-10 13:29:35 +00:00
Remy Sharp
9853e089b4 Fixed #118 plus a bunch of jshint fixes 2013-12-04 12:31:37 +00:00
Remy Sharp
c503222f30 Refactoring.
* userScript => script
* simplified exec library
* removed dead code in config loading
* nodemon now knows when it's being required (and goes dark)
* etc...
2013-12-03 13:34:40 +00:00