UNPKG

@funny-ui/cli

Version:
60 lines (50 loc) 1.62 kB
#!/usr/bin/env node import { Command } from "commander"; import fse from "fs-extra"; import { CLI_PACKAGE_JSON } from "./shared/constant.js"; const { readJSONSync } = fse; const program = new Command(); program .version(`funny-cli ${readJSONSync(CLI_PACKAGE_JSON).version}`) .usage("<command> [options]"); // program // .command("dev") // .option( // "-f --force", // "Force dep pre-optimization regardless of whether deps have changed" // ) // .description("Run funny ui development environment") // .action(async (options) => { // const { compile } = await import("./commands/compile.js"); // return compile(); // }); // program // .command("build") // .description("Build funny ui site for production") // .action(async (options) => { // const { compile } = await import("./commands/compile.js"); // return compile(); // }); // program // .command("preview") // .description("Preview funny ui site for production") // .action(async (options) => { // const { compile } = await import("./commands/compile.js"); // return compile(); // }); program .command("compile") .description("Compile funny components library code") .action(async () => { const { compile } = await import("./commands/compile.js"); return compile(); }); // program // .command("release") // .option("-r --remote <remote>", "Remote name") // .description("Release all packages and generate changelogs") // .action(async (options) => { // const { compile } = await import("./commands/compile.js"); // return compile(); // }); program.parse();