redoc/build/tasks/watch.js
2016-01-09 22:37:01 +02:00

15 lines
616 B
JavaScript

var gulp = require('gulp');
var paths = require('../paths');
var browserSync = require('browser-sync').get('bs');
function changed(event) {
console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
}
gulp.task('watch', ['buildDev'], function () {
gulp.watch([ paths.source ], [ 'bundle', browserSync.reload ]).on('change', changed);
gulp.watch([ paths.html ], [ 'bundle', browserSync.reload]).on('change', changed);
gulp.watch([ paths.scss ], [ 'bundle', browserSync.reload]).on('change', changed);
gulp.watch([ paths.demo ], [ '', browserSync.reload ]).on('change', changed);
});