redoc/build/tasks/watch.js

15 lines
616 B
JavaScript
Raw Normal View History

2015-10-03 11:54:09 +03:00
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...');
}
2016-01-09 23:23:49 +03:00
gulp.task('watch', ['buildDev'], function () {
2015-10-26 21:21:09 +03:00
gulp.watch([ paths.source ], [ 'bundle', browserSync.reload ]).on('change', changed);
gulp.watch([ paths.html ], [ 'bundle', browserSync.reload]).on('change', changed);
2015-11-22 15:08:28 +03:00
gulp.watch([ paths.scss ], [ 'bundle', browserSync.reload]).on('change', changed);
2015-10-03 11:54:09 +03:00
gulp.watch([ paths.demo ], [ '', browserSync.reload ]).on('change', changed);
});