wangyj
Version:
wangyj 个人常用命令库
29 lines (28 loc) • 1.5 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("wss").description("npm镜像源操作命令");
// 查看当前镜像源命令
program.command("now").description("查看当前镜像源").action(index_1.wssNow);
// 查看默认镜像源列表
program.command("ls").description("查看镜像源列表").action(index_1.wssList);
// 切换镜像源
program.command("use").description("切换镜像源").action(index_1.wssUse);
// 添加自定义镜像源
program.command("add").description("添加自定义镜像源").action(index_1.wssAdd);
// 编辑自定义镜像源
program.command("edit").description("编辑自定义镜像源").action(index_1.wssEdit);
// 删除自定义镜像源
program.command("remove").description("删除自定义镜像源").action(index_1.wssRemove);
// 测试镜像源地址速度
program.command("ping").description("测试镜像地址速度").action(index_1.wssPing);
program.version((0, printVersion_1.printVersion)(package_json_1.default.version), "-V, --version", "输出版本号");
program.parse(process.argv);