mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-19 19:04:06 -06:00
Merge branch 'jackyzha0:v4' into v4
This commit is contained in:
commit
dcd16e05d5
@ -151,16 +151,19 @@ async function startWatching(
|
|||||||
const changes: ChangeEvent[] = []
|
const changes: ChangeEvent[] = []
|
||||||
watcher
|
watcher
|
||||||
.on("add", (fp) => {
|
.on("add", (fp) => {
|
||||||
|
fp = toPosixPath(fp)
|
||||||
if (buildData.ignored(fp)) return
|
if (buildData.ignored(fp)) return
|
||||||
changes.push({ path: fp as FilePath, type: "add" })
|
changes.push({ path: fp as FilePath, type: "add" })
|
||||||
void rebuild(changes, clientRefresh, buildData)
|
void rebuild(changes, clientRefresh, buildData)
|
||||||
})
|
})
|
||||||
.on("change", (fp) => {
|
.on("change", (fp) => {
|
||||||
|
fp = toPosixPath(fp)
|
||||||
if (buildData.ignored(fp)) return
|
if (buildData.ignored(fp)) return
|
||||||
changes.push({ path: fp as FilePath, type: "change" })
|
changes.push({ path: fp as FilePath, type: "change" })
|
||||||
void rebuild(changes, clientRefresh, buildData)
|
void rebuild(changes, clientRefresh, buildData)
|
||||||
})
|
})
|
||||||
.on("unlink", (fp) => {
|
.on("unlink", (fp) => {
|
||||||
|
fp = toPosixPath(fp)
|
||||||
if (buildData.ignored(fp)) return
|
if (buildData.ignored(fp)) return
|
||||||
changes.push({ path: fp as FilePath, type: "delete" })
|
changes.push({ path: fp as FilePath, type: "delete" })
|
||||||
void rebuild(changes, clientRefresh, buildData)
|
void rebuild(changes, clientRefresh, buildData)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user