完成部分文章生成

This commit is contained in:
hydrogen committed 2026-04-18 23:20:31 +08:00
1 parent 2a8f56470f
commit 1d37f84b6c
10 files changed
+330

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import { parse } from "jsr:@std/toml";
import path from "node:path";
const text = await Deno.readTextFile("config.toml");
const data = parse(text);
console.log(data);
export async function parse_config_file(
path: path.ParsedPath,
): Promise<Record<string, unknown>> {
const toml = await Deno.readTextFile(path.toString());
return parse(toml);
}