Merge pull request #271 from es128/patch-1

Simplify chokidar event handler
This commit is contained in:
Sebastian McKenzie 2014-12-09 09:57:12 +11:00
commit ccb56fe33f

View File

@ -116,13 +116,11 @@ 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) {
}).on("all", function (type, filename) {
if (type === "add" || type === "change" || type === "unlink" ) {
console.log(type, filename);
walk();
});
}
});
}
};