Commit Graph

76 Commits

Author SHA1 Message Date
Tarmo Aidantausta
eead311749 fix: to avoid confusion like in #1528, always report used extension 2019-09-29 11:01:52 +01:00
Remy Sharp
12b66cd492 fix: langauge around "watching" (#1591)
ref: #1583

It was unclear whether it was listing files being watched when in fact
it was the list of directories (plus, make it cleaner)
2019-09-03 11:54:44 +01:00
Remy Sharp
363891ff3d fix: revert stdin handling
Fixes #1389
Fixes #1390
Ref #1386

Means that ctrl^l does not instantly clear the terminal. It requires a
new line directly after.
2018-07-13 20:21:46 +01:00
Remy Sharp
25a181351f fix: send proper quit signal on ctrl-c (#1387)
Fixes #1386

Also sends the correct signal codes on exit - so instead of $?=1 on
ctrl-c, you'll see $?=130 as per http://tldp.org/LDP/abs/html/exitcodes.html
2018-07-11 12:51:35 +01:00
Remy Sharp
a974892eae feat: support ctrl+l to clear
And refactor the stdin handling
2018-07-10 18:41:45 +01:00
Remy Sharp
9bbc219fd5 fix: only hook SIGINT on boot - not at require
Fixes #1326
2018-05-05 20:16:37 +01:00
Remy Sharp
c121187611 refactor: indexOf > includes (in node4) 2018-01-08 12:33:51 +00:00
Remy Sharp
718a9ad2e2 fix: correctly pass ignored rules to chokidar
Previous the rules weren't matching fully inside of chokidar, requiring
that, for instance, node_modules is written as **/node_modules/**.

I've also tidied up what's printed in verbose mode, so it doesn't print
default ignores, and doesn't print the full path of an ignored
directory.

This change _also_ fixes notifications from chokidar from user ignored
paths (using the `cwd` argument). This should fix #1202
2018-01-08 12:33:51 +00:00
Remy Sharp
8cb26bfe25 refactor: small tweaks to ES6-ish 2018-01-06 09:35:16 +00:00
Remy Sharp
5a914cb35b fix: handle exit(2) better 2017-12-29 10:55:12 +00:00
Dominykas Blyžė
009d868516 feat: support wildcard extension matching 2017-12-20 14:08:32 +00:00
Remy Sharp
30f999a06c feat: support SIGHUP to restart nodemon
Also small linting tweaks and typos in comments.

Fixes #393
2017-12-15 08:46:01 +00:00
Garth Kidd
abc138f570 fix: help truncation on node 6.2 (#842) (#843) 2017-09-04 19:36:06 +01:00
Nicolas Chambrier
bded0ac549 fix(stdin): don't watch for 'rs' when --no-stdin is provided 2016-04-10 00:16:21 +02:00
Remy Sharp
0b13116551 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-10-19 12:27:53 +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
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
242f03cdd9 Detail which events bound + test fix 2015-01-19 20:13:12 +00:00
Remy Sharp
fa7826a2ac Fixed event binding to nodemon not bus 2015-01-16 17:36:25 +00:00
Remy Sharp
65d2d49120 Merge branch 'master' into feature/pre-post-events 2015-01-16 10:07:03 +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
8d08b183a1 Fixed nodemon require reset fully
And related events test
2015-01-07 21:45:14 +00:00
Remy Sharp
b09a37f2e8 Fixed "watching extension: undefined" 2015-01-07 21:45:14 +00:00
Remy Sharp
69715211d0 Merge branch 'master' into feature/pre-post-events 2015-01-03 15:49:16 +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
6f6d7ae496 Early support for event callbacks
Allows user to have event handlers in the nodemon config, such as:

{
  "events": {
    "crash": "say 'your app crashed'",
    "start": "echo 'App started' | tee app.log"
  }
}
2014-12-09 22:56:02 +00:00
Remy Sharp
96bd4b3e79 Fixed tests on Mac
Specifically race conditions where the child process was being left running still
2014-12-04 22:07:34 +00:00
Remy Sharp
dd550f161d Only read stdin if option says so 2014-12-02 13:04:36 +00:00
Ricardo Nogueira
457e87e9b7 Fix minor typo in removeAllListeners 2014-11-07 18:12:25 +00:00
Michael Heuberger
c4e263ed37 expose streams for piping (mh) 2014-06-04 02:49:24 +12:00
Remy Sharp
a34a47bfba Text tweaks 2014-05-28 12:49:11 +01:00
Remy Sharp
50976c2aee Fixed #334
If a single file was being watched, it would use the tryBaseDir method to work out the directory, but fail as a pattern so it would return the base directory - which is too much. Now we test if that string is a real file or a directory, and if it is, it returns *that* back out.
2014-05-14 09:56:44 +01:00
Remy Sharp
59a5851552 fixed #289. setTimeout to the rescue? 2014-04-04 10:50:57 +01:00
Remy Sharp
d5c4d1c594 Revert package version away from RC to 1.0.16
Conflicts:
	package.json
2014-03-20 12:14:13 +00: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
a9f8dd97ec Work on #304 and #304 to read the stdout *stream*
Changed it from using `.on('data')` to using a PassThrough stream which does the job much better, but the readline demos don't work when they're doing anything special on stdout, like `.cursorTo`. WIP.
2014-03-19 14:27:03 +00:00
Remy Sharp
25abc37fd2 allow dump to run without any extra args 2014-01-15 14:14:45 +00:00
Remy Sharp
169d3fb11d Add support for --cwd (and .cwd) to run nodemon from that root 2014-01-09 13:09:39 +00:00
Remy Sharp
b35c3347b2 Merge branch 'fix/74' of github.com:remy/nodemon into fix/74
Conflicts:
	lib/monitor/watch.js
2014-01-07 22:59:11 +00:00
Remy Sharp
96e78e672d If user exec, then don't require script. Fixes #259. 2014-01-07 22:34:15 +00:00
Remy Sharp
c78bcb9faa Documentation of required nodemon 2014-01-05 22:59:23 +00:00
Remy Sharp
cf070d4ae3 Merge branch 'fix/74' of github.com:remy/nodemon into fix/74
Conflicts:
	lib/monitor/watch.js
	lib/nodemon.js
	package.json
2014-01-05 16:03:22 +00:00
Remy Sharp
ab549a1e85 All tests passing (damn race conditions) 2014-01-05 10:16:39 +00:00
Remy Sharp
13770da9f3 Fixed nodemon.once. Add config.run. Tests not 100% passing
Something weird is happening with required nodemon and re-running lots of times, that somehow resets the config. I know it's due to my tests, but I'm unsure which one is actually causing the damn issue. Anyway, bed for me, it's almost 2am. Sod this for a game of cricket.
2014-01-05 01:42:37 +00:00
Remy Sharp
bdcf4478c2 nodemon without args and no package, show usage.txt 2014-01-03 18:39:56 +00:00
Remy Sharp
b429f800a8 Don't show "false" on "watching" boot up 2014-01-03 18:31:15 +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
f3e76157d2 Tweaking how watching works
Fixed nodemon to echo out what's being watched in the regexp instead of the config.dir path.

Also allowing patterns on the "watch" config setting, rather than just paths.

Removed useless test (that kept failing...incorrectly).
2014-01-03 14:20:46 +00:00