diff --git a/main.ts b/main.ts index 4727764..12b1afc 100644 --- a/main.ts +++ b/main.ts @@ -118,6 +118,9 @@ const options = { await library.archive(args.values["out-dir"]!); }, }, + json: { + type: "boolean", + }, help: { type: "boolean", short: "h", @@ -134,6 +137,14 @@ const options = { const args = util.parseArgs({ options }); +if (args.values.json) { + console.dir = function dir(arrayOrObject) { + for (const obj of [arrayOrObject].flat()) { + console.log(JSON.stringify(obj)); + } + }; +} + for (const option of Object.keys(options)) { if (args.values[option] && typeof options[option].run === "function") { await options[option].run();