Commit Graph

109 Commits

Author SHA1 Message Date
Alessandro Zanardi
4c195df510 fix: JSON extension not watched when "scriptExt" is defined
Fix a bug that caused ".json" files to not be watched by default.

closes #643
2015-10-20 15:38:50 +02:00
Remy Sharp
e6708d220c Merge pull request #693 from pensierinmusica/patch-1
fix: JSON extension not watched outside of coffeescript
2015-10-20 06:55:25 +01:00
Alessandro Zanardi
ceb1515ec0 fix: JSON extension not watched outside of coffeescript
Fix a bug that caused `.json` file to not be watched outside of a coffeescript environment,
and improves the extension formatting regex.

Closes #643
2015-10-19 19:17:49 +02:00
Remy Sharp
725a409c69 refactor: allow dev use of nodemon to show githash
Rather than an arbitrary version string - this will only happen when cloned from git, rather than an npm install. This is entirely for debugging.
2015-09-21 14:24:39 +01:00
Alessandro Zanardi
cd4201afa6 feat: add JSON to default watched extensions
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
2015-09-21 11:25:17 +01:00
Remy Sharp
6a5397e166 fix: allows user to not watch
Fixes #516
2015-09-21 11:24:16 +01:00
Remy Sharp
8af4b4bc81 fix: make control over ignoreRoot easier
And add documentation and tests
2015-09-21 10:23:19 +01:00
Remy Sharp
d98301d436 chore: Merge branch 'feature/legacy-polling-mode'
Conflicts:
	test/cli/parse.test.js
2015-09-19 10:43:08 +01:00
Remy Sharp
f4b12476e1 chore: Merge branch 'master' into feature/disable-colour 2015-09-19 10:29:08 +01:00
Remy Sharp
489f22dc93 fix: restore --legacy-watch
Pass the `usePolling` flag to Chokidar when in legacy mode, which is supposed to/hopefully fix containers watching network attached drives.

Fixes #639
Fixes #633
2015-09-19 08:20:39 +01:00
Remy Sharp
5e07bfef85 fix: supporting env values in package.start
Before it was trying to parse the value in .start, when in fact, the entire value represents the `cmd`.

Fixes #621
Fixes #615
Fixes #577
Fixes #513
2015-09-12 22:51:02 +01:00
Remy Sharp
6e40e9adfd feat: support disabling colour output
via cli --no-color/--no-colour and via nodemon.json colours: false
2015-09-12 22:34:07 +01:00
Remy Sharp
15b0b88d0f feat: merge ignore rules with defaults
And allow the user to override the defaults from their config
2015-09-12 11:34:28 +01:00
Remy Sharp
7250919e6d fix: restore file count in verbose mode 2015-09-12 11:34:20 +01:00
Remy Sharp
438b8d7c0e refactor: passing jscs 2015-09-09 22:30:43 +01:00
Remy Sharp
7496f08330 fix: incorrectly exiting when required
test: updated travis tests
2015-09-09 22:29:26 +01:00
Remy Sharp
b0fd56f7de refactor: move watch out in favour of chokidar
Plus jscs clean ups
2015-08-31 18:25:55 +01:00
Remy Sharp
e177dd7865 Merge pull request #578 from khoomeister/ck-disable-startup
add option --no-startup to not run command on startup
2015-07-27 21:44:05 +01:00
Chris Khoo
50f5994ee6 change --no-startup to --on-change-only 2015-07-20 18:40:45 -07:00
Remy Sharp
4de7033898 Merge pull request #585 from halt-hammerzeit/fix_watch_interval
Fixes watch interval
2015-07-20 21:35:27 +01:00
Nikolay Kuchumov
8eefdd0d00 Fixes watch interval 2015-07-11 20:06:54 +03:00
Chris Khoo
db196733b7 add option --no-startup to not run command on startup 2015-07-05 16:19:11 -07:00
Matan Shukry
abd3e27a24 Added closeSync() to trigger watch 2015-06-13 20:14:57 +03:00
Doug Patti
56c4caf2ed pull command stringification into a utility
This was copied and pasted more than a handful of times around the
library and tests. Some implementations were more naive and did not
try to add quotes if there are spaces within a single argument.

There is one slight oddity in one of the cli parse tests. Stringifying
the command causes many of the arguments to show up in quotes when they
probably shouldn't. This seems to trace back to a deep problem related
to how commands are pulled out of package.scripts.start and is out of
scope for this patch. Even though the test might look incorrect now, it
is an accurate reflection of what the generated command is.
2015-04-22 13:42:55 -04:00
Doug Patti
a71db72ece when running a coffee file, use --nodejs correctly
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
2015-04-22 13:42:52 -04:00
Remy Sharp
7e6fe7c945 Fixes #352
The find method wasn't known when it tries to add the directories to monitor. This change fixes that
2015-02-10 19:22:40 +00:00
Remy Sharp
d796e41120 Remove the need for execArgs when user specifying an exec
- 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.
2015-02-01 15:59:49 +00:00
Remy Sharp
afc646f026 Fixed #474
Support spaces in exec - the user must escape using the ^ character as per http://superuser.com/a/279121
2015-01-28 13:27:21 +00:00
Remy Sharp
ce0b5bc9cc Only discover exec from package if no script
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).
2015-01-20 14:13:25 +00:00
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
c223bfe5d5 Find on linux and detect container offset
Closes #455
Closes #453
Fixes #419

This method creates a file and checks the stat to check of an offset between the date on the machine and the created time on the file system. Docker (in my tests) show that you can get the offset using this method.

Once we have the offset, we tell the user (once) and then we use that to find files that have been modified according to the offset (either looking in the last using -mmin or in the future using -newer + a touched file).
2015-01-08 12:35:58 +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
Albert Slawinski
ba7c59ceb7 Find command optimization 2014-08-18 15:46:21 -07:00
Remy Sharp
84521855c8 Cleaning up exit 2014-06-04 12:51:23 +01:00
Remy Sharp
3dd8498a10 Clean up watch test file on exit too 2014-06-04 12:51:23 +01:00
Remy Sharp
c11ace1de3 Ignore node_modules by default. Fixes #339 2014-05-28 12:48:26 +01: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
17b75f9267 Fixes nodemon -w being blank and defaults to *.* 2014-01-27 15:23:47 +00:00
Remy Sharp
2a2f1260e4 If no script, default is null, not -1. Fixes #265
Includes test and exposing the command run for debugging.
2014-01-21 07:57:27 +00:00
Remy Sharp
b6b98716a1 Quiet option wasn't working. 2014-01-17 23:37:12 +00:00
Remy Sharp
b9b1cd5499 Moved watch+ignore conversion to match library 2014-01-16 23:45:50 +00:00
Remy Sharp
f636bc16f5 execMap uses script ext to lookup. Fixes #265
+ tests
2014-01-16 22:52:39 +00:00