完成部分文章生成
This commit is contained in:
1 parent
2a8f56470f
commit
1d37f84b6c
10 files changed
+330
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user