Skip to content

Commit

Permalink
Merge pull request #724 from OrderMyGear/polling-interval
Browse files Browse the repository at this point in the history
feat: support --polling-interval command line arg
  • Loading branch information
remy committed Feb 19, 2016
2 parents c2fad01 + fc2bc16 commit ec80818
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 ec80818

Please sign in to comment.