mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-26 05:19:01 +00:00
19 lines
611 B
TypeScript
19 lines
611 B
TypeScript
import sourceMapSupport from "source-map-support"
|
|
sourceMapSupport.install(options)
|
|
import cfg from "../quartz.config"
|
|
import { Argv, BuildCtx } from "./ctx"
|
|
import { FilePath, ServerSlug } from "./path"
|
|
import { createFileParser, createProcessor } from "./processors/parse"
|
|
import { options } from "./sourcemap"
|
|
|
|
// only called from worker thread
|
|
export async function parseFiles(argv: Argv, fps: FilePath[], allSlugs: ServerSlug[]) {
|
|
const ctx: BuildCtx = {
|
|
cfg,
|
|
argv,
|
|
allSlugs,
|
|
}
|
|
const processor = createProcessor(ctx)
|
|
const parse = createFileParser(ctx, fps)
|
|
return parse(processor)
|
|
}
|