Skip to content

Commit

Permalink
Don't depend on deprecated gulp watch
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfr committed Nov 9, 2020
1 parent 85a77df commit 9200a3a
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1,143 deletions.
17 changes: 8 additions & 9 deletions core/tasks/watch.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
const gulp = require('gulp');
const watch = require('gulp-watch');
const browserSync = require('browser-sync');
const paths = require('../paths');

module.exports = function () {
global.isWatching = true;

watch([paths.content.scss.all, paths.core.scss.all], () => gulp.start('sass'));
watch(paths.content.assets.images, () => gulp.start('copy:images'));
watch(paths.content.assets.favicon, () => gulp.start('copy:favicon'));
watch(paths.content.assets.fonts, () => gulp.start('copy:fonts'));
watch(paths.content.assets.resources, () => gulp.start('copy:resources'));
watch(paths.content.iconFont.sourceFiles, () => gulp.start('icon-font'));
watch(paths.content.icons.sourceFiles, () => browserSync.reload());
gulp.watch([paths.content.scss.all, paths.core.scss.all], gulp.series('sass'));
gulp.watch(paths.content.assets.images, gulp.series('copy:images'));
gulp.watch(paths.content.assets.favicon, gulp.series('copy:favicon'));
gulp.watch(paths.content.assets.fonts, gulp.series('copy:fonts'));
gulp.watch(paths.content.assets.resources, gulp.series('copy:resources'));
gulp.watch(paths.content.iconFont.sourceFiles, gulp.series('icon-font'));
gulp.watch(paths.content.icons.sourceFiles, browserSync.reload());
gulp.watch(paths.content.js.allFiles, gulp.series('bundle'));
};
};
Loading

0 comments on commit 9200a3a

Please sign in to comment.