equal
deleted
inserted
replaced
|
1 'use strict'; |
|
2 |
|
3 // var config = require('../config.js'); |
|
4 var gulp = require('gulp'); |
|
5 var livereload = require('gulp-livereload'); |
|
6 |
|
7 // Watch |
|
8 gulp.task('watch', ['connect', 'serve'], function () { |
|
9 var server = livereload(); |
|
10 // Watch for changes in `app` folder |
|
11 gulp.watch([ |
|
12 // 'app/jade/**/*.jade', |
|
13 // 'app/*.html', |
|
14 // 'app/scss/**/*.scss', |
|
15 // 'app/scripts/**/*.js', |
|
16 // 'app/images/**/*', |
|
17 '.tmp/**/*' |
|
18 ]).on('change', function(file) { |
|
19 server.changed(file.path); |
|
20 }); |
|
21 |
|
22 // Watch .less files |
|
23 gulp.watch('app/less/**/*.less', ['styles']); |
|
24 |
|
25 // Watch .js files |
|
26 gulp.watch('app/js/**/*.js', ['browserify']); |
|
27 |
|
28 // Watch image files |
|
29 gulp.watch('app/img/**/*', ['images']); |
|
30 |
|
31 // Watch .html files |
|
32 gulp.watch('app/**/*.html', ['html']); |
|
33 }); |