Booru Support #1

Merged
sam merged 7 commits from remote into master 2022-03-15 19:13:39 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 836adab5c0 - Show all commits

View file

@ -14,6 +14,7 @@ const optionDefinitions = [
name: "verbose",
type: Boolean,
alias: "v",
defaultValue: false,
description: "Print debugging output.",
},
{
@ -59,7 +60,7 @@ if (args.help) {
if (args.verbose) console.log("Running in verbose mode.\n");
if (args.writeConfig) {
writeConfig();
writeConfig(args.verbose);
console.log("Wrote default config file to ./config.jsonc");
exit(0);
}

View file

@ -1,11 +1,10 @@
import { writeFileSync } from "fs";
import args from "./cli.js";
/**
* Writes the sample config file to disk
* @returns Nothing
*/
export default function writeConfig() {
if (args.verbose) console.log("Writing sample config to config.jsonc");
export default function writeConfig(verbose: boolean) {
if (verbose) console.log("Writing sample config to config.jsonc");
writeFileSync(
"./config.jsonc",
// eslint-disable-next-line prettier/prettier