mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-23 16:23:13 +00:00
28 lines
659 B
JavaScript
28 lines
659 B
JavaScript
|
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');
|
||
|
});
|