mirror of
https://github.com/SrIzan10/nodemon.git
synced 2026-05-01 10:55:09 +00:00
@@ -154,6 +154,9 @@ function match(files, monitor, ext) {
|
||||
var prefix = s.slice(0, 1);
|
||||
|
||||
if (prefix === '!') {
|
||||
if (s.indexOf('!' + cwd) === 0) {
|
||||
return s;
|
||||
}
|
||||
return '!**' + (prefix !== path.sep ? path.sep : '') + s.slice(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,12 @@ function watch() {
|
||||
|
||||
const promise = new Promise(function (resolve) {
|
||||
const dotFilePattern = /[/\\]\./;
|
||||
var ignored = Array.from(rootIgnored);
|
||||
var ignored = match.rulesToMonitor(
|
||||
[], // not needed
|
||||
Array.from(rootIgnored),
|
||||
config
|
||||
).map(pattern => pattern.slice(1));
|
||||
|
||||
const addDotFile = dirs.filter(dir => dir.match(dotFilePattern));
|
||||
|
||||
// don't ignore dotfiles if explicitly watched.
|
||||
|
||||
Reference in New Issue
Block a user