mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2025-10-28 20:45:35 -05:00
15 lines
411 B
JavaScript
15 lines
411 B
JavaScript
import {Command} from "commander";
|
|
import {prettifyFile, prettifyFolder} from "./util-prettify-data.js";
|
|
|
|
const program = new Command()
|
|
.option("--file <file>", `Input file`)
|
|
.option("--dir <dir>", `Input directory ()`, "./data")
|
|
;
|
|
|
|
program.parse(process.argv);
|
|
const params = program.opts();
|
|
|
|
if (params.file) prettifyFile(params.file);
|
|
else prettifyFolder(params.dir);
|
|
console.log("Prettifying complete.");
|