first public source commit

This commit is contained in:
Ben Phelps 2022-08-24 10:44:35 +03:00
parent 1a4fbb9d42
commit 3914fee775
65 changed files with 4697 additions and 312 deletions

13
src/utils/config.js Normal file
View file

@ -0,0 +1,13 @@
import { join } from "path";
import { existsSync, copyFile } from "fs";
export default function checkAndCopyConfig(config) {
const configYaml = join(process.cwd(), "config", config);
if (!existsSync(configYaml)) {
const configSkeleton = join(process.cwd(), "src", "skeleton", config);
copyFile(configSkeleton, configYaml, (err) => {
if (err) throw err;
console.info("%s was copied to the config folder", config);
});
}
}