From 0d3cf2922618774fc397dca8cb92fcf76fb0db02 Mon Sep 17 00:00:00 2001
From: Ben Schlegel <31989404+benschlegel@users.noreply.github.com>
Date: Mon, 18 Sep 2023 21:32:00 +0000
Subject: [PATCH] docs: fix explorer example (#483)
---
quartz/worker.ts | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/quartz/worker.ts b/quartz/worker.ts
index e2c278f..b92bdac 100644
--- a/quartz/worker.ts
+++ b/quartz/worker.ts
@@ -1,11 +1,19 @@
-import config from "../quartz.config"
+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"
-
-const transformers = config.plugins.transformers
-const processor = createProcessor(transformers)
+import { options } from "./util/sourcemap"
// only called from worker thread
-export async function parseFiles(baseDir: string, fps: string[], verbose: boolean) {
- const parse = createFileParser(baseDir, fps, verbose)
+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)
}
--
Gitblit v1.10.0