add gulp watch for js files

This commit is contained in:
Florian BLOUET
2015-11-25 14:37:25 +01:00
parent 170f1bd80d
commit f2daa53aa7
11 changed files with 149 additions and 58 deletions

View File

@@ -23,11 +23,7 @@ gulp.task('build-common-css', ['build-common-font-css'],function(){
], 'common', 'common/css/')
});
gulp.task('watch-common', function() {
gulp.watch(config.paths.src + 'common/**/*.scss', ['build-common-css']);
});
gulp.task('build-common', ['copy-common-images', 'build-common-css'], function(){
gulp.task('build-common-js', function(){
var commonGroup = [
// config.paths.dist + 'assets/bootstrap/js/bootstrap.js', // should append no conflict
config.paths.src + 'vendors/jquery-mousewheel/js/jquery.mousewheel.js',
@@ -47,4 +43,16 @@ gulp.task('build-common', ['copy-common-images', 'build-common-css'], function()
config.paths.dist + 'include/jslibs/flowplayer/flowplayer-3.2.13.min.js' // @TODO: should be moved away (embed-bundle)
];
return utils.buildJsGroup(commonGroup, 'common', 'common/js');
});
gulp.task('watch-common-js', function() {
return gulp.watch(config.paths.src + 'common/**/*.js', ['build-common-js']);
});
gulp.task('watch-common-css', function() {
gulp.watch(config.paths.src + 'common/**/*.scss', ['build-common-css']);
});
gulp.task('build-common', ['copy-common-images', 'build-common-css'], function(){
return gulp.start('build-common-js');
});