Skip to content

Commit

Permalink
feat: support --polling-interval command line arg
Browse files Browse the repository at this point in the history
  • Loading branch information
drtz committed Nov 10, 2015
1 parent 8e48001 commit fc2bc16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/cli/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ function nodemonOption(options, arg, eatNext) {
options.legacyWatch = true;
} else

if (arg === '--polling-interval' || arg === '-P') {
options.pollingInterval = parseInt(eatNext(), 10);
} else

// Depricated as this is "on" by default
if (arg === '--js') {
options.js = true;
Expand Down
1 change: 1 addition & 0 deletions lib/monitor/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function watch() {
ignored: ignored,
persistent: true,
usePolling: config.options.legacyWatch || false,
interval: config.options.pollingInterval,
});

watcher.ready = false;
Expand Down

0 comments on commit fc2bc16

Please sign in to comment.