|
|
@ -3,11 +3,8 @@ import { existsSync, copyFile } from "fs";
|
|
|
|
|
|
|
|
|
|
|
|
export default function checkAndCopyConfig(config) {
|
|
|
|
export default function checkAndCopyConfig(config) {
|
|
|
|
const configYaml = join(process.cwd(), "config", config);
|
|
|
|
const configYaml = join(process.cwd(), "config", config);
|
|
|
|
console.log("config:", configYaml);
|
|
|
|
|
|
|
|
if (!existsSync(configYaml)) {
|
|
|
|
if (!existsSync(configYaml)) {
|
|
|
|
console.log("does not exist");
|
|
|
|
|
|
|
|
const configSkeleton = join(process.cwd(), "src", "skeleton", config);
|
|
|
|
const configSkeleton = join(process.cwd(), "src", "skeleton", config);
|
|
|
|
console.log("skeleton", configSkeleton);
|
|
|
|
|
|
|
|
copyFile(configSkeleton, configYaml, (err) => {
|
|
|
|
copyFile(configSkeleton, configYaml, (err) => {
|
|
|
|
if (err) {
|
|
|
|
if (err) {
|
|
|
|
console.log("error copying config", err);
|
|
|
|
console.log("error copying config", err);
|
|
|
|