1 | const chokidar = require('chokidar');
|
2 |
|
3 | module.exports = (globs, callback) => {
|
4 | const watcher = chokidar.watch(globs, {
|
5 | ignored: [
|
6 | /(^|[/\\])\../,
|
7 | /node_modules|[/\\]\./
|
8 | ]
|
9 | });
|
10 |
|
11 | watcher.on('all', callback);
|
12 | return watcher;
|
13 | };
|