Initial commit

This commit is contained in:
2024-06-03 16:32:04 -07:00
committed by GitHub
commit 22d9a7e84e
232 changed files with 22758 additions and 0 deletions

19
quartz/worker.ts Normal file
View File

@ -0,0 +1,19 @@
import sourceMapSupport from "source-map-support"
sourceMapSupport.install(options)
import cfg from "../quartz.config"
import { Argv, BuildCtx } from "./util/ctx"
import { FilePath, FullSlug } from "./util/path"
import { createFileParser, createProcessor } from "./processors/parse"
import { options } from "./util/sourcemap"
// only called from worker thread
export async function parseFiles(argv: Argv, fps: FilePath[], allSlugs: FullSlug[]) {
const ctx: BuildCtx = {
cfg,
argv,
allSlugs,
}
const processor = createProcessor(ctx)
const parse = createFileParser(ctx, fps)
return parse(processor)
}