|
|
@ -11,7 +11,7 @@ const { getPages } = require('./util'); |
|
|
|
const browserSync = require('browser-sync').create(); |
|
|
|
const reload = browserSync.reload; |
|
|
|
|
|
|
|
let srcPath = "src" |
|
|
|
const { srcPath } = require("./config") |
|
|
|
|
|
|
|
let isProd = process.env.NODE_ENV === "production" |
|
|
|
|
|
|
@ -121,10 +121,10 @@ function watchTask() { |
|
|
|
.on("change", reload) |
|
|
|
.on("unlink", reload) |
|
|
|
}) |
|
|
|
// watch([`${srcPath}/html/**/*`], allTask(pageFn))
|
|
|
|
// .on("add", reload)
|
|
|
|
// .on("change", reload)
|
|
|
|
// .on("unlink", reload)
|
|
|
|
watch([`${srcPath}/html/__**/*`], allTask(pageFn)) |
|
|
|
.on("add", reload) |
|
|
|
.on("change", reload) |
|
|
|
.on("unlink", reload) |
|
|
|
} |
|
|
|
|
|
|
|
exports.watch = series(remove,static, common, allTask(asset), allTask(pageFn), watchTask) |
|
|
|