lack 1.3.15 → 1.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/watch.js +4 -2
- package/package.json +1 -1
package/bin/watch.js
CHANGED
|
@@ -107,10 +107,12 @@ module.exports = (dirs) => {
|
|
|
107
107
|
};
|
|
108
108
|
console.log(`Watching the following files/folders changes:\n${tips}`); // eslint-disable-line
|
|
109
109
|
console.log('\n*********************************************\n'); // eslint-disable-line
|
|
110
|
+
const ignoredRe = /(^|[/\\])(\..|node_modules([/\\]|$))/;
|
|
110
111
|
chokidar.watch(watchList, {
|
|
111
|
-
ignored:
|
|
112
|
+
ignored: ignoredRe,
|
|
112
113
|
}).on('raw', (_, filename, details) => {
|
|
113
|
-
if (filename.includes('package.json') || filename.includes('.console.log')
|
|
114
|
+
if (filename.includes('package.json') || filename.includes('.console.log') ||
|
|
115
|
+
ignoredRe.test(filename)) {
|
|
114
116
|
return;
|
|
115
117
|
}
|
|
116
118
|
const watchedPath = (details && details.watchedPath) || filename;
|