wangyj
Version:
wangyj 个人常用命令库
25 lines (24 loc) • 1.25 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const commander_1 = require("commander");
const package_json_1 = __importDefault(require("../../package.json"));
const printVersion_1 = require("../../utils/printVersion");
const index_1 = require("./command/index");
const program = new commander_1.Command();
program.name("wdt").description("项目脚手架命令");
// 查看项目模板列表
program.command("ls").description("查看项目模板列表").action(index_1.wdtList);
// 添加项目模板
program.command("add").description("添加项目模板").action(index_1.wdtAdd);
// 编辑项目模板
program.command("edit").description("编辑项目模板").action(index_1.wdtEdit);
// 删除项目模板
program.command("remove").description("删除项目模板").action(index_1.wdtRemove);
// 从模板生成新项目
program.command("init").description("从模板生成新项目").action(index_1.wdtInit);
program.version((0, printVersion_1.printVersion)(package_json_1.default.version), "-V, --version", "输出版本号");
program.parse(process.argv);