Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions lib/monitor/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,20 +244,6 @@ function match(files, monitor, ext) {

debug('good', good)

// finally check the good files against the extensions that we're monitoring
if (ext) {
if (ext.indexOf(',') === -1) {
ext = '**/*.' + ext;
} else {
ext = '**/*.{' + ext + '}';
}

good = good.filter(function (file) {
// only compare the filename to the extension test
return minimatch(path.basename(file), ext, minimatchOpts);
});
} // else assume *.*

var result = good.concat(whitelist);

if (utils.isWindows) {
Expand Down
2 changes: 2 additions & 0 deletions lib/monitor/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ function watch() {
ignored.push(dotFilePattern);
}

const ext = undefsafe(config, 'options.execOptions.ext') || '';
var watchOptions = {
ignorePermissionErrors: true,
ignored: ignored,
persistent: true,
usePolling: config.options.legacyWatch || false,
interval: config.options.pollingInterval,
ext: ext.length > 0 ? ext.split(',') : undefined,
// 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
Expand Down