1
0
mirror of https://gitlab.com/MisterBiggs/brain-quartz.git synced 2025-07-23 14:51:33 +00:00

fix(cli): filter files on rebuild using --serve (#2039)

* filter files on rebuild

* fix prettier
This commit is contained in:
circular
2025-07-02 18:05:46 +10:00
committed by GitHub
parent 52a5196f38
commit 930eb1c413

View File

@@ -251,9 +251,12 @@ async function rebuild(changes: ChangeEvent[], clientRefresh: () => void, buildD
// update allFiles and then allSlugs with the consistent view of content map // update allFiles and then allSlugs with the consistent view of content map
ctx.allFiles = Array.from(contentMap.keys()) ctx.allFiles = Array.from(contentMap.keys())
ctx.allSlugs = ctx.allFiles.map((fp) => slugifyFilePath(fp as FilePath)) ctx.allSlugs = ctx.allFiles.map((fp) => slugifyFilePath(fp as FilePath))
const processedFiles = Array.from(contentMap.values()) let processedFiles = filterContent(
.filter((file) => file.type === "markdown") ctx,
.map((file) => file.content) Array.from(contentMap.values())
.filter((file) => file.type === "markdown")
.map((file) => file.content),
)
let emittedFiles = 0 let emittedFiles = 0
for (const emitter of cfg.plugins.emitters) { for (const emitter of cfg.plugins.emitters) {