Limit file patterns in gulp watch
This commit is contained in:
@@ -217,6 +217,7 @@ gulp.task('clean', require('del').bind(null, [path.dist]));
|
|||||||
// See: http://www.browsersync.io
|
// See: http://www.browsersync.io
|
||||||
gulp.task('watch', function() {
|
gulp.task('watch', function() {
|
||||||
browserSync({
|
browserSync({
|
||||||
|
files: [path.dist, '{lib,templates}/**/*.php', '*.php'],
|
||||||
proxy: config.devUrl,
|
proxy: config.devUrl,
|
||||||
snippetOptions: {
|
snippetOptions: {
|
||||||
whitelist: ['/wp-admin/admin-ajax.php'],
|
whitelist: ['/wp-admin/admin-ajax.php'],
|
||||||
@@ -228,9 +229,6 @@ gulp.task('watch', function() {
|
|||||||
gulp.watch([path.source + 'fonts/**/*'], ['fonts']);
|
gulp.watch([path.source + 'fonts/**/*'], ['fonts']);
|
||||||
gulp.watch([path.source + 'images/**/*'], ['images']);
|
gulp.watch([path.source + 'images/**/*'], ['images']);
|
||||||
gulp.watch(['bower.json', 'assets/manifest.json'], ['build']);
|
gulp.watch(['bower.json', 'assets/manifest.json'], ['build']);
|
||||||
gulp.watch('**/*.php', function() {
|
|
||||||
browserSync.reload();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// ### Build
|
// ### Build
|
||||||
|
|||||||
Reference in New Issue
Block a user