diff -r 9be99c2fb279 -r d7c5bffdd2d8 client/pianoroll/gulp/tasks/watch.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/pianoroll/gulp/tasks/watch.js Mon Jan 12 17:23:05 2015 +0100 @@ -0,0 +1,33 @@ +'use strict'; + +// var config = require('../config.js'); +var gulp = require('gulp'); +var livereload = require('gulp-livereload'); + +// Watch +gulp.task('watch', ['connect', 'serve'], function () { + var server = livereload(); + // Watch for changes in `app` folder + gulp.watch([ + // 'app/jade/**/*.jade', + // 'app/*.html', + // 'app/scss/**/*.scss', + // 'app/scripts/**/*.js', + // 'app/images/**/*', + '.tmp/**/*' + ]).on('change', function(file) { + server.changed(file.path); + }); + + // Watch .less files + gulp.watch('app/less/**/*.less', ['styles']); + + // Watch .js files + gulp.watch('app/js/**/*.js', ['browserify']); + + // Watch image files + gulp.watch('app/img/**/*', ['images']); + + // Watch .html files + gulp.watch('app/**/*.html', ['html']); +});