ui-thing
Version:
CLI used to add Nuxt 3 components to a project
34 lines (26 loc) • 929 B
text/typescript
import { Command } from "commander";
import { version } from "../package.json";
import { add } from "./commands/add";
import { init } from "./commands/init";
import { addPrettier } from "./commands/prettier";
import { addShortcuts } from "./commands/shortcuts";
import { theme } from "./commands/theme";
import { printFancyBoxMessage } from "./utils/printFancyBoxMessage";
process.on("SIGINT", () => process.exit(0));
process.on("SIGTERM", () => process.exit(0));
process.on("SIGTSTP", () => process.exit(0));
const program = new Command();
console.clear();
printFancyBoxMessage("UI Thing", { title: "Welcome" });
console.log();
program
.name("ui-thing")
.description("CLI for adding ui-thing components to your Nuxt 3 application")
.version(version)
.addCommand(init)
.addCommand(add)
.addCommand(theme)
.addCommand(addShortcuts)
.addCommand(addPrettier);
program.parse(process.argv);