Files
wpep/tools/gp/config.ts
T
2026-04-18 23:20:31 +08:00

13 lines
353 B
TypeScript

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);
}