Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #240 from Shopify/ignore-dot-file-watch
Browse files Browse the repository at this point in the history
Ignore watching dot files in dist/ directory
  • Loading branch information
t-kelly authored Aug 24, 2017
2 parents d705433 + dec7edf commit 91c1b35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/slate-tools/src/tasks/build-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ gulp.task('build:assets', () => {
gulp.task('watch:assets', () => {
const eventCache = utils.createEventCache();

chokidar.watch(assetsPaths, {ignoreInitial: true})
.on('all', (event, path) => {
messages.logFileEvent(event, path);
eventCache.addEvent(event, path);
utils.processCache(eventCache, processAssets, removeAssets);
});
chokidar.watch(assetsPaths, {
ignored: /(^|[/\\])\../,
ignoreInitial: true,
}).on('all', (event, path) => {
messages.logFileEvent(event, path);
eventCache.addEvent(event, path);
utils.processCache(eventCache, processAssets, removeAssets);
});
});
1 change: 1 addition & 0 deletions packages/slate-tools/src/tasks/watchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ gulp.task('watch:src', [
gulp.task('watch:dist', () => {
const watcher = chokidar.watch(['./', '!config.yml'], {
cwd: config.dist.root,
ignored: /(^|[/\\])\../,
ignoreInitial: true,
});

Expand Down

0 comments on commit 91c1b35

Please sign in to comment.