lerna - 为什么 lerna 在引导时运行“预发布”?
问题描述
当我运行时lerna bootstrap
,根据文档:
Usage
$ lerna bootstrap
Bootstrap the packages in the current Lerna repo. Installs all of their dependencies and links any cross-dependencies.
When run, this command will:
npm install all external dependencies of each package.
Symlink together all Lerna packages that are dependencies of each other.
npm run prepublish in all bootstrapped packages (unless --ignore-prepublish is passed).
npm run prepare in all bootstrapped packages.
既然引导与发布无关,为什么它会运行prepublish
?为什么它是默认值?
解决方案
因为npm install
也会触发prepublish
脚本。如果您希望不触发预发布脚本,请改用该prepublishOnly
脚本。您可以在NPM 脚本文档中阅读所有相关信息
推荐阅读
- c# - 可空引用类型的条件编译
- c# - Azure 存储服务 API 调用:如何使用 NextPartitionKey 和 NextRowKey?
- python - 千位分隔符正则表达式
- python - 使用 __init__() 中的请求数据更改 django 表单中的输入内容
- jmeter-5.0 - 分布式测试模式下的 Jmeter 5.2.1 - 在查看结果树中看不到响应数据
- javascript - 渲染一个反应组件 n 次
- ios - 如何从 iOS Swift 中的可编码模型创建嵌套 json?
- regex - 操作字符串以创建新列 pandas 的更好方法
- azure-devops - Azure Rest API 问题
- javascript - 使用 videoJS 检测 VOD 中的当前片段 ID