From dde1da4c78470fec3565920df418a3786fb57797 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Mon, 21 Oct 2013 15:38:31 -0700 Subject: [PATCH] feat(watcher): ignore initial "add" events Initially all the patterns are scanned using glob. Then we start watching then with chokidar. Chokidar now allows to ignore initial "add" event, which was ignored by the fileList anyway. --- lib/watcher.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/watcher.js b/lib/watcher.js index 232ffa81d..ee113fd37 100644 --- a/lib/watcher.js +++ b/lib/watcher.js @@ -75,6 +75,7 @@ exports.watch = function(patterns, excludes, fileList) { var watchedPatterns = getWatchedPatterns(patterns); var options = { ignorePermissionErrors: true, + ignoreInitial: true, ignored: createIgnore(watchedPatterns, excludes) }; var chokidarWatcher = new chokidar.FSWatcher(options);