👷 Add YAML parser

This commit is contained in:
Anand Chowdhary
2020-08-08 23:27:55 +05:30
parent 832ec601dd
commit b3fc676c51
+14
View File
@@ -0,0 +1,14 @@
import { readFile } from "fs-extra";
import { safeLoad } from "js-yaml";
import { join } from "path";
export const update = async () => {
const config = safeLoad(
await readFile(join(".", ".statusrc.yml"), "utf8")
) as { sites: string[] };
for await (const url of config.sites) {
console.log("Checking", url);
}
};
update();