Add "targets" command

This commit is contained in:
K35
2022-01-07 08:45:08 +00:00
parent 49425cab39
commit 983ba1f870
4 changed files with 20 additions and 8 deletions

View File

@ -2,7 +2,7 @@
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
import startCompile, { Target } from "./process";
import startCompile, { Target, Targets } from "./process";
import dbg from "debug";
const log = dbg("app");
@ -54,6 +54,12 @@ yargs(hideBin(process.argv))
})
}
)
.command("targets", "List all targets", (yargs)=>yargs, ()=>{
console.log("Targets:")
Targets.forEach((__dirname, target) => {
console.log(" " + target);
})
})
.option("verbose", {
alias: "v",
type: "boolean",