UNPKG

beesbuild

Version:

构建工具链

18 lines (17 loc) 638 B
import { Command } from "commander"; import * as variables from "../variables.mjs"; import * as scripts from "../scripts/index.mjs"; import { handleOptions, init } from "./utils.mjs"; const sync = (program) => { if (!(program instanceof Command)) { program = init(variables).end(); } program.command("sync").description("\u540C\u6B65\u672C\u5730\u4E0ENPM\u7684\u5305\u4FE1\u606F").argument("[version]", "\u6307\u5B9A\u7248\u672C\u540C\u6B65").option("--info").action(async (version, { info }) => { const opts = handleOptions(program, { version }); await scripts.sync(opts); }); return program; }; export { sync };