fix watch-mode batching

This commit is contained in:
Jacky Zhao 2023-07-24 00:04:01 -07:00
parent 569ff1a801
commit 041a4ce7bc
14 changed files with 91 additions and 77 deletions
quartz

View file

@ -3,16 +3,14 @@ import { Argv, BuildCtx } from "./ctx"
import { FilePath, ServerSlug } from "./path"
import { createFileParser, createProcessor } from "./processors/parse"
const transformers = cfg.plugins.transformers
const processor = createProcessor(transformers)
// only called from worker thread
export async function parseFiles(argv: Argv, fps: FilePath[], allSlugs: ServerSlug[]) {
const ctx: BuildCtx = {
cfg,
argv,
allSlugs,
}
const parse = createFileParser(ctx, fps, allSlugs)
const processor = createProcessor(ctx)
const parse = createFileParser(ctx, fps)
return parse(processor)
}