Skip to content

Commit ec80818

Browse files
committed
Merge pull request #724 from OrderMyGear/polling-interval
feat: support --polling-interval command line arg
2 parents c2fad01 + fc2bc16 commit ec80818

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/cli/parse.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ function nodemonOption(options, arg, eatNext) {
135135
options.legacyWatch = true;
136136
} else
137137

138+
if (arg === '--polling-interval' || arg === '-P') {
139+
options.pollingInterval = parseInt(eatNext(), 10);
140+
} else
141+
138142
// Depricated as this is "on" by default
139143
if (arg === '--js') {
140144
options.js = true;

lib/monitor/watch.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function watch() {
5353
ignored: ignored,
5454
persistent: true,
5555
usePolling: config.options.legacyWatch || false,
56+
interval: config.options.pollingInterval,
5657
});
5758

5859
watcher.ready = false;

0 commit comments

Comments
 (0)