Simplify chokidar event handler

This commit is contained in:
Elan Shanker 2014-12-08 17:17:31 -05:00
parent 61b9c28ce6
commit 6f6d9bd5a8

View File

@ -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();
});
}
};