2018-11-23 08:04:42 +01:00
|
|
|
const gulp = require('gulp');
|
|
|
|
const livereload = require('gulp-livereload');
|
2019-04-13 05:25:58 +02:00
|
|
|
const gulpWatch = require('gulp-watch');
|
2018-11-23 08:04:42 +01:00
|
|
|
const paths = require('./helpers/paths.js');
|
|
|
|
|
|
|
|
require('./copy.js');
|
|
|
|
require('./webpack.js');
|
|
|
|
|
2019-04-13 05:25:58 +02:00
|
|
|
function watch() {
|
2018-11-23 08:04:42 +01:00
|
|
|
livereload.listen({ start: true });
|
|
|
|
|
2019-04-13 05:25:58 +02:00
|
|
|
gulp.task('webpackWatch')();
|
|
|
|
gulpWatch(paths.src.html, gulp.series('copyHtml'));
|
|
|
|
gulpWatch(`${paths.src.fonts}**/*.*`, gulp.series('copyFonts'));
|
|
|
|
gulpWatch(`${paths.src.images}**/*.*`, gulp.series('copyImages'));
|
|
|
|
}
|
2018-11-23 08:04:42 +01:00
|
|
|
|
2019-04-13 05:25:58 +02:00
|
|
|
gulp.task('watch', gulp.series('build', watch));
|