Skip to content

Commit

Permalink
chore: Merge branch 'master'
Browse files Browse the repository at this point in the history
[skip ci]

* 'master' of github.com:remy/nodemon:
  fix: Replace `jade` references by `pug`
  chore: test funding.yml change
  chore: update funding
  test: ensure ignore relative paths
  • Loading branch information
remy committed Nov 20, 2019
2 parents 95a4c09 + 7d6c1a8 commit b58cf7d
Show file tree
Hide file tree
Showing 15 changed files with 1,155 additions and 784 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
@@ -1,2 +1,2 @@
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: [remy]
open_collective: nodemon
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -178,10 +178,10 @@ Don't use unix globbing to pass multiple directories, e.g `--watch ./lib/*`, it
By default, nodemon looks for files with the `.js`, `.mjs`, `.coffee`, `.litcoffee`, and `.json` extensions. If you use the `--exec` option and monitor `app.py` nodemon will monitor files with the extension of `.py`. However, you can specify your own list with the `-e` (or `--ext`) switch like so:

```bash
nodemon -e js,jade
nodemon -e js,pug
```

Now nodemon will restart on any changes to files in the directory (or subdirectories) with the extensions `.js`, `.jade`.
Now nodemon will restart on any changes to files in the directory (or subdirectories) with the extensions `.js`, `.pug`.

## Ignoring files

Expand Down
2 changes: 1 addition & 1 deletion doc/cli/help.txt
Expand Up @@ -3,7 +3,7 @@
Options:

--config file ............ alternate nodemon.json config file to use
-e, --ext ................ extensions to look for, ie. js,jade,hbs.
-e, --ext ................ extensions to look for, ie. js,pug,hbs.
-x, --exec app ........... execute script with "app", ie. -x "python -v".
-w, --watch path.......... watch directory "path" or files. use once for
each directory or file to watch.
Expand Down
2 changes: 1 addition & 1 deletion doc/cli/options.txt
Expand Up @@ -12,7 +12,7 @@ Configuration
Execution
-C, --on-change-only ..... execute script on change only, not startup
--cwd <dir> .............. change into <dir> before running the script
-e, --ext ................ extensions to look for, ie. "js,jade,hbs"
-e, --ext ................ extensions to look for, ie. "js,pug,hbs"
-I, --no-stdin ........... nodemon passes stdin directly to child process
--spawn .................. force nodemon to use spawn (over fork) [node only]
-x, --exec app ........... execute script with "app", ie. -x "python -v"
Expand Down
2 changes: 1 addition & 1 deletion lib/config/exec.js
Expand Up @@ -198,7 +198,7 @@ function exec(nodemonOptions, execMap) {
}

// allow users to make a mistake on the extension to monitor
// converts .js, jade => js,jade
// converts .js, pug => js,pug
// BIG NOTE: user can't do this: nodemon -e *.js
// because the terminal will automatically expand the glob against
// the file system :(
Expand Down
7 changes: 6 additions & 1 deletion lib/monitor/watch.js
Expand Up @@ -58,6 +58,11 @@ function watch() {
persistent: true,
usePolling: config.options.legacyWatch || false,
interval: config.options.pollingInterval,
// note to future developer: I've gone back and forth on adding `cwd`
// to the props and in some cases it fixes bugs but typically it causes
// bugs elsewhere (since nodemon is used is so many ways). the final
// decision is to *not* use it at all and work around it
// cwd: ...
};

if (utils.isWindows) {
Expand Down Expand Up @@ -85,7 +90,7 @@ function watch() {

watchedFiles.push(file);
bus.emit('watching', file);
debug('watching dir: %s', file);
debug('chokidar watching: %s', file);
});
watcher.on('ready', function () {
watchedFiles = Array.from(new Set(watchedFiles)); // ensure no dupes
Expand Down

0 comments on commit b58cf7d

Please sign in to comment.