about summary refs log tree commit diff stats
path: root/src/config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.ts')
-rw-r--r--src/config.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config.ts b/src/config.ts
new file mode 100644
index 0000000..064b038
--- /dev/null
+++ b/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"));
+}