Rezygnacja z bazy, przeniesienie danych do plików yamla
This commit is contained in:
7
src/lib/loadYaml.ts
Normal file
7
src/lib/loadYaml.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import fs from "node:fs";
|
||||
import yaml from "js-yaml";
|
||||
|
||||
export function loadYamlFile<T>(filePath: string): T {
|
||||
const raw = fs.readFileSync(filePath, "utf8");
|
||||
return yaml.load(raw) as T;
|
||||
}
|
||||
Reference in New Issue
Block a user