feat: initial prototype
Node.js CI / Lint and Test (push) Failing after 1m0s

This commit is contained in:
2025-09-22 16:45:38 -07:00
parent b5c1ec7fa0
commit 03c559b6cf
23 changed files with 8445 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import { readdir, readFile, writeFile } from "node:fs/promises";
import { join } from "node:path";
import { parse } from "yaml";
const files = await readdir(join(import.meta.dirname, "data"));
for (const file of files) {
if (!file.endsWith(".yml")) continue;
const name = file.split(".")[0];
if (name === undefined) {
continue;
} // Handled manually
const path = join(import.meta.dirname, "data", file);
const contents = await readFile(path, "utf-8");
const object = await parse(contents);
await writeFile(join(import.meta.dirname, "data", `${name}.json`), JSON.stringify(object, null, 2), "utf-8");
}