From 8c291ab76078352a6d39ea98d5330ee02fb19728 Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Tue, 16 Feb 2016 09:16:17 -0800 Subject: [PATCH] chore: exclude all fragment files from shred watchers closes #845 Faster authoring process although must kick the browser more frequently with F5 because the refresh timing isn't quite right. --- gulpfile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 9b74ccb743..cfcd8efb11 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -640,10 +640,10 @@ function apiExamplesWatch(postShredAction) { function devGuideExamplesWatch(shredOptions, postShredAction) { var includePattern = path.join(shredOptions.examplesDir, '**/*.*'); - var excludePattern = '!' + path.join(shredOptions.examplesDir, '**/node_modules/**/*.*'); - // removed this version because gulp.watch has the same glob issue that dgeni has. + // removed this version because gulp.watch has the same glob issue that dgeni has. + // var excludePattern = '!' + path.join(shredOptions.examplesDir, '**/node_modules/**/*.*'); // gulp.watch([includePattern, excludePattern], {readDelay: 500}, function (event, done) { - var files = globby.sync( [includePattern], { ignore: [ '**/node_modules/**']}); + var files = globby.sync( [includePattern], { ignore: [ '**/node_modules/**', '**/_fragments/**']}); gulp.watch([files], {readDelay: 500}, function (event, done) { gutil.log('Dev Guide example changed') gutil.log('Event type: ' + event.type); // added, changed, or deleted @@ -657,7 +657,7 @@ function devGuideSharedJadeWatch(shredOptions, postShredAction) { // removed this version because gulp.watch has the same glob issue that dgeni has. // var excludePattern = '!' + path.join(shredOptions.jadeDir, '**/node_modules/**/*.*'); // gulp.watch([includePattern, excludePattern], {readDelay: 500}, function (event, done) { - var files = globby.sync( [includePattern], { ignore: [ '**/node_modules/**', '**/guide/_fragments/**']}); + var files = globby.sync( [includePattern], { ignore: [ '**/node_modules/**', '**/_fragments/**']}); gulp.watch([files], {readDelay: 500}, function (event, done) { gutil.log('Dev Guide jade file changed') gutil.log('Event type: ' + event.type); // added, changed, or deleted