fix watch-mode batching

This commit is contained in:
Jacky Zhao
2023-07-24 00:04:01 -07:00
parent a1350c1192
commit f66aa378a9
14 changed files with 91 additions and 77 deletions

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)
}