1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-23 16:23:13 +00:00
Lidarr/frontend/gulp/watch.js

28 lines
659 B
JavaScript
Raw Normal View History

2017-09-04 02:20:56 +00:00
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');
});