mirror of
https://github.com/koodiklinikka/koodiklinikka.fi.git
synced 2026-01-26 11:23:58 +00:00
replace gulp's built-in watch with gulp-watch
https://github.com/leonidas/gulp-project-template/issues/24
This commit is contained in:
10
gulpfile.js
10
gulpfile.js
@@ -19,6 +19,7 @@ var streamify = require('gulp-streamify');
|
||||
var stylus = require('gulp-stylus');
|
||||
var uglify = require('gulp-uglify');
|
||||
var watchify = require('watchify');
|
||||
var watch = require('gulp-watch');
|
||||
|
||||
/*eslint "no-process-env":0 */
|
||||
var production = process.env.NODE_ENV === 'production';
|
||||
@@ -149,9 +150,12 @@ gulp.task('server', function() {
|
||||
});
|
||||
|
||||
gulp.task('watch', function() {
|
||||
gulp.watch(config.templates.watch, ['templates']);
|
||||
gulp.watch(config.styles.watch, ['styles']);
|
||||
gulp.watch(config.assets.watch, ['assets']);
|
||||
|
||||
['templates', 'styles', 'assets'].forEach(function(watched) {
|
||||
watch(config[watched].watch, function() {
|
||||
gulp.start(watched);
|
||||
});
|
||||
});
|
||||
|
||||
var bundle = watchify(browserify(browserifyConfig));
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
"gulp-stylus": "~2.0.0",
|
||||
"gulp-uglify": "~1.0.1",
|
||||
"gulp-util": "~3.0.1",
|
||||
"gulp-watch": "^4.3.4",
|
||||
"jsdom": "^5.6.0",
|
||||
"mocha": "^2.2.5",
|
||||
"node-notifier": "^4.2.1",
|
||||
|
||||
Reference in New Issue
Block a user