1.0.36 • Published 9 months ago
@build-script/node-package-tools v1.0.36
Node.js 包发布辅助工具集
使用方式
二选一:
node-package-tools [--common opts] <command> [--params]
njspkg [--common opts] <command> [--params]
通用参数
通用参数也可以在command后面
--quiet
: 默认显示较多输出,设置后只显示结果--registry <xxx>
: 默认使用.npmrc中的设置--dist-tag <xxx>
: 要比较的tag,默认为"latest"--package <xxx>
: 包的本地路径,默认为当前目录
可用工具
--bump
: 不要输出,而是:如果发现有修改,则自动更新package.json(当前仅支持将version的PATCH位+1)--json
: 输出json(当检测到stdout不是终端时,默认为json输出)
此工具要求PATH中存在git
输出结果示例:
--json
模式:{ changedFiles: [......], changed: true }
- 默认模式:
changed no.
/changed yes.
只要运行过程没有错误,程序就返回0,无论是否发现修改。
没有专用参数,但命令行中的“--”不可省略
示例:
Eg: njspkg run-if-version-mismatch -- pnpm publish --no-git-checks