Read config from TOML file
1 file changed, 9 insertions(+), 0 deletions(-)
changed files
A src/config.ts
@@ -0,0 +1,9 @@ +import path from "node:path"; +import fs from "node:fs"; +import toml from "toml"; + +export default function readConfig(base: string) { + const filename = path.join(base, "config.toml"); + + return toml.parse(fs.readFileSync(filename, "utf-8")); +}