From ebad24e94b60ef7db3e6f896f0e533ff332fc2f7 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Thu, 12 Nov 2015 11:25:18 +0000 Subject: [PATCH] chore(gulpfile): improve serve-and-sync task Remove the `browserSync` watch as we are manually reloading the browser when our own watchers complete. Ensure that the API watcher actually triggers the browserSync reload. --- gulpfile.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index a648936759..60c87d39ad 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -67,10 +67,7 @@ gulp.task('serve-and-sync', ['build-docs'], function (cb) { var browserSync = require('browser-sync').create(); browserSync.init({ - proxy: 'localhost:9000', - files: [path.join(DOCS_PATH, '**/*/**/*')], - logFileChanges: true, - reloadDelay: 500 + proxy: 'localhost:9000' }); devGuideExamplesWatch(_devguideShredOptions, function() { @@ -237,7 +234,7 @@ function apiSourceWatch(postShredAction) { console.log('Event type: ' + event.event); // added, changed, or deleted console.log('Event path: ' + event.path); // The path of the modified file // need to run just build - Q.all([buildApiDocs('ts'), buildApiDocs('js')]).then(done); + Q.all([buildApiDocs('ts'), buildApiDocs('js')]).then(postShredAction); }); var examplesPattern = [path.join(ANGULAR_PROJECT_PATH, 'modules/angular2/examples/**/*.*')]; watch(examplesPattern, function (event, done) {