From a53772bbd1dd2804872ae0e519bedeb2a2fd4287 Mon Sep 17 00:00:00 2001
From: Osman Tunahan ARIKAN <154083945+OsmanTunahan@users.noreply.github.com>
Date: Wed, 30 Oct 2024 22:33:22 +0000
Subject: [PATCH] feat(i18n): add turkish language (#1554)
---
quartz/worker.ts | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/quartz/worker.ts b/quartz/worker.ts
index 9c81ed0..a209df9 100644
--- a/quartz/worker.ts
+++ b/quartz/worker.ts
@@ -1,12 +1,25 @@
-import config from "../quartz.config"
-import { FilePath, ServerSlug } from "./path"
+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: FilePath[], allSlugs: ServerSlug[], verbose: boolean) {
- const parse = createFileParser(transformers, baseDir, fps, allSlugs, verbose)
+export async function parseFiles(
+ buildId: string,
+ argv: Argv,
+ fps: FilePath[],
+ allSlugs: FullSlug[],
+) {
+ const ctx: BuildCtx = {
+ buildId,
+ cfg,
+ argv,
+ allSlugs,
+ }
+ const processor = createProcessor(ctx)
+ const parse = createFileParser(ctx, fps)
return parse(processor)
}
--
Gitblit v1.10.0