|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { join, path } from "path";
|
|
|
|
|
import { join } from "path";
|
|
|
|
|
import { existsSync, copyFile, promises as fs } from "fs";
|
|
|
|
|
import yaml from "js-yaml";
|
|
|
|
|
|
|
|
|
@ -19,7 +19,7 @@ export default function checkAndCopyConfig(config) {
|
|
|
|
|
export async function getSettings() {
|
|
|
|
|
checkAndCopyConfig("settings.yaml");
|
|
|
|
|
|
|
|
|
|
const settingsYaml = path.join(process.cwd(), "config", "settings.yaml");
|
|
|
|
|
const settingsYaml = join(process.cwd(), "config", "settings.yaml");
|
|
|
|
|
const fileContents = await fs.readFile(settingsYaml, "utf8");
|
|
|
|
|
return yaml.load(fileContents);
|
|
|
|
|
}
|
|
|
|
|