Skip to content

Commit

Permalink
add gen config
Browse files Browse the repository at this point in the history
  • Loading branch information
NullDev committed Dec 1, 2024
1 parent 96c13f2 commit 0a9220b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions generate-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/node
import fs from "node:fs/promises";

// ========================= //
// = Copyright (c) NullDev = //
// ========================= //

if (await fs.stat("./config/config.custom.js").catch(() => false)){
console.log("Config file already exists. Skipping...");
process.exit(0);
}
await fs.copyFile("./config/config.template.js", "./config/config.custom.js");
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"prepare-today": "node ./prepare_day.js",
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint:fix": "eslint . --fix",
"generate-config": "node ./generate-config.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 0a9220b

Please sign in to comment.