137 Commits

Author SHA1 Message Date
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
2582d960be fix: clarify which config files are actually used
Fixes #1204
2018-01-06 09:35:16 +00:00
Remy Sharp
8cb26bfe25 refactor: small tweaks to ES6-ish 2018-01-06 09:35:16 +00:00
Josef Brandl
d78bf3d5d1 fix: watch both js and mjs files if main file is JavaScript 2017-12-29 16:51:17 +00:00
Remy Sharp
de66c6bcea refactor: fix scoping issue in node@4 2017-12-29 10:55:12 +00:00
Remy Sharp
5a914cb35b fix: handle exit(2) better 2017-12-29 10:55:12 +00:00
Remy Sharp
6333fa5a4c chore: fix linting 2017-12-29 10:55:12 +00:00
Remy Sharp
6e839d4a33 fix: support implicit filename extension
Fixes #1193
2017-12-29 10:55:12 +00:00
Remy Sharp
c63771726c fix: expose no update flag 2017-12-29 10:54:59 +00:00
Remy Sharp
4589bc8a60 fix: properly ignore defaults, don't match partial
Changed to passing Chokidar simple strings instead of custom regexp, only had to prefix with **/ to get it to match the ignore directories properly.

Fixes #916
2017-12-20 23:21:35 +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
Remy Sharp
a282afbbe3 fix: support nodemon index to expand to index.js
With support for custom extensions (picking only the first).

Fixes #1165
2017-12-15 08:45:49 +00:00
Remy Sharp
6a4fb22602 fix: pass through execArgs from config (#1142)
* fix: pass through execArgs from config

Also updating some deps and linting tweaks

* chore: add message on postinstall

Lost funds from gratipay and codesponsor 😢
2017-12-05 18:01:55 +00:00
Remy Sharp
24a4b84717 feat: disable chokidar globbing on windows (#1140)
Fixes a range of issues, including:

Fixes #1115

* refactor: use Object.assign in place of merge (this will leak to more work)

Since we're now supporting 6 upwards
2017-12-04 20:05:58 +00:00
Jay Beavers
5a89df6471 fix: Support for .mjs es6 modules (#1138) 2017-12-04 14:55:16 +00:00
Leonard Martin
f3e0c29f15 fix: read config file before defaulting script parameter (#1110)
If I have a nodemon.json config file with an `exec` property, then this is automatically appended with ` index.js` when running `nodemon` standalone.

I would expect this to be equivalent to running `nodemon --exec "my cmd"` - that is providing an `exec` prevents defaulting of `script` to index.js.

To resolve, move the code which defaults the `script` property when `exec` is undefined to after the config files have been read, so that the behaviour is the same irrespective of whether properties are set in CLI flags or in nodemon.json.
2017-12-04 14:52:23 +00:00
Marcus Noble
29a9a449d5 fix: Add support for multi-level filenames 2017-10-08 16:19:47 +01:00
Steven Patrick
0e4b310c1c Fix: nodemon can't read config files encoded with BOM e.g. UTF-8-BOM #1031 2017-09-04 20:26:28 +01:00
Rich Hodgkins
fb5da380c8 feat: nodemonConfig support in package.json
* feat: support using ‘nodemonConfig’ in package.json

Implements loading configuration options from the `nodemonConfig` value in the package.json, nodemon.json is still preferred before looking at the new option.
Also includes tests.

Closes #873

* docs: update for using ‘nodemonConfig’ in package.json

Add to both the README and `nodemon --help config`.

#1028
2017-09-04 20:26:17 +01:00
Matt Lyons
63e8606748 fix: exit when fail to parse the config file (#921)
Fixes #651
2017-09-04 20:22:21 +01:00
Marc Trudel
2cd85b1f60 feat: add support for customisable signal 2016-10-06 19:52:41 +01:00
Kyle Smith
ee110add53 feat: support --config command line arg
Implement `--config <file>` option to allow config loading from an arbitrary file instead of being
bound to the static `$PWD/nodemon.json`.

Closes #755 
Closes #855
2016-07-25 22:01:45 +01:00
Mark Wubben
6ccb29864c refactor: get default ignoreRoot from ignore-by-default
Switches the default ignoreRoot to a list obtained from the ignore-by-default
package. See <https://github.com/novemberborn/ignore-by-default>.

This allows nodemon to tap into a shared list of directories it should ignore
when watching for changes. E.g. compared to the original list it's already been
extended with `.nyc_output` and `coverage` directories.
2016-02-25 21:08:44 +00:00
Remy Sharp
b95469aeb4 test: check non-english chrs don't blow up 2016-02-25 11:14:27 +00:00
Lewis Cowper
1addfea880 fix: update regex to include unicode extensions -- no tests yet cc: @remy 2016-02-25 11:35:13 +01:00
Bence Dányi
3480f37aab fix: watch js, json files by default
In node the file extension is optional, so by default nodemon should watch
js and json files.

Closes #710
2015-10-29 20:03:43 +01:00
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