### 安装 - GitRepoURI 为项目的 git 代码仓库 URI ```bash $ yarn global add ${GitRepoURI} ``` ### 本地调试 ``` $ yarn HelloWorld hello ``` ### 开发 ## 添加新命令 - 在 command 下添加新的 ts 文件,文件名和需要注册的命令名保持一致 - 命令需要默认导出函数 `(p:Command) => void`, 该函数在初始化时将被运行,可以在函数中注册命令 - Command 具体参数与使用,参考[commander](https://github.com/tj/commander.js) - 基本代码如下: ``` import { Command } from "commander"; export default (program: Command) => { program .command("commandName") .description("命令描述") .action(async function () { // dosomething }); }; ``` ## 提交代码 - 重新构建代码 ``` $ yarn build ``` - 打版本 ``` $ yarn version ``` - 提交