From e0cce8ff9de936e78cade784be3c9a17f1cfae8d Mon Sep 17 00:00:00 2001 From: Joe Maller Date: Wed, 6 May 2015 21:39:30 -0400 Subject: [PATCH] BrowserSync task stream reloading See https://github.com/roots/sage/pull/1457#issuecomment-99560449 This is option 2. --- gulpfile.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index ea4f7f7..613d101 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -196,7 +196,8 @@ gulp.task('scripts', ['jshint'], function() { gulp.task('fonts', function() { return gulp.src(globs.fonts) .pipe(flatten()) - .pipe(gulp.dest(path.dist + 'fonts')); + .pipe(gulp.dest(path.dist + 'fonts')) + .pipe(browserSync.stream()); }); // ### Images @@ -208,7 +209,8 @@ gulp.task('images', function() { interlaced: true, svgoPlugins: [{removeUnknownsAndDefaults: false}] })) - .pipe(gulp.dest(path.dist + 'images')); + .pipe(gulp.dest(path.dist + 'images')) + .pipe(browserSync.stream()); }); // ### JSHint @@ -234,7 +236,7 @@ gulp.task('clean', require('del').bind(null, [path.dist])); // See: http://www.browsersync.io gulp.task('watch', function() { browserSync.init({ - files: [path.dist, '{lib,templates}/**/*.php', '*.php'], + files: ['{lib,templates}/**/*.php', '*.php'], proxy: config.devUrl, snippetOptions: { whitelist: ['/wp-admin/admin-ajax.php'],