Simplify chokidar event handler
This commit is contained in:
parent
61b9c28ce6
commit
6f6d9bd5a8
@ -116,13 +116,9 @@ module.exports = function (commander, filenames) {
|
||||
var watcher = chokidar.watch(filenames, {
|
||||
persistent: true,
|
||||
ignoreInitial: true
|
||||
});
|
||||
|
||||
_.each(["add", "change", "unlink"], function (type) {
|
||||
watcher.on(type, function (filename) {
|
||||
console.log(type, filename);
|
||||
walk();
|
||||
});
|
||||
}).on("all", function (type, filename) {
|
||||
console.log(type, filename);
|
||||
walk();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user