You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
659 B
28 lines
659 B
var gulp = require('gulp');
|
|
var livereload = require('gulp-livereload');
|
|
var watch = require('gulp-watch');
|
|
var paths = require('./helpers/paths.js');
|
|
|
|
require('./copy.js');
|
|
require('./webpack.js');
|
|
|
|
function watchTask(glob, task) {
|
|
var options = {
|
|
name: `watch: ${task}`,
|
|
verbose: true
|
|
};
|
|
return watch(glob, options, () => {
|
|
gulp.start(task);
|
|
});
|
|
}
|
|
|
|
gulp.task('watch', ['copyHtml', 'copyFonts', 'copyImages', 'copyJs'], () => {
|
|
livereload.listen();
|
|
|
|
gulp.start('webpackWatch');
|
|
|
|
watchTask(paths.src.html, 'copyHtml');
|
|
watchTask(paths.src.fonts + '**/*.*', 'copyFonts');
|
|
watchTask(paths.src.images + '**/*.*', 'copyImages');
|
|
});
|