mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
Change grunt for gulp
This commit is contained in:
22
build/watch.js
Normal file
22
build/watch.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import gulp from 'gulp';
|
||||
import paths from '../mconfig.json';
|
||||
import styles from './styles.js';
|
||||
import scripts from './scripts.js';
|
||||
import svgs from './svgs.js';
|
||||
import concat from './concat.js';
|
||||
import { server } from './serve.js';
|
||||
|
||||
function watch() {
|
||||
gulp.watch(paths.styles.src, styles);
|
||||
gulp.watch(paths.scripts.src, gulp.series(scripts, reload));
|
||||
gulp.watch(paths.scripts.vendors.src, concat);
|
||||
gulp.watch(paths.views.src, reload);
|
||||
gulp.watch(paths.svgs.src, gulp.series(svgs, reload));
|
||||
}
|
||||
|
||||
function reload(done) {
|
||||
server.reload();
|
||||
done();
|
||||
}
|
||||
|
||||
export default watch;
|
||||
Reference in New Issue
Block a user