From f69b84df75626a420db0a6a29c03ff8fc0388a7a Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Thu, 17 Mar 2016 21:41:02 -0400 Subject: [PATCH] Watch script files except _*.js for changes --- gulpfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 181109c9..dbff4235 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -43,7 +43,7 @@ gulp.task('css', function() { * **/ gulp.task('scripts', function() { - return gulp.src(['assets/js/vendor/jquery/*.js', 'assets/js/plugins/*.js', 'assets/js/_main*.js']) + return gulp.src(['assets/js/vendor/jquery/*.js', 'assets/js/plugins/**/*.js', 'assets/js/_main*.js']) .pipe(uglify()) .pipe(rename({ basename: "main", @@ -92,6 +92,6 @@ gulp.task('images', function () { gulp.task('default', ['css', 'jslint', 'scripts', 'images'], function () { gulp.watch('assets/scss/**/*.scss', ['css']); gulp.watch('assets/js/_*.js', ['jslint']); - gulp.watch('assets/js/**/*.js', ['scripts']); + gulp.watch(['!assets/js/**/*_.js', 'assets/js/plugins/**/*.js', 'assets/js/vendor/**/*.js'], ['scripts']); gulp.watch('images/*', ['images']); }); \ No newline at end of file