We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
假如,我们有个 npm 包叫 test
test
0.0.1
npm publish
npm i test
0.0.1-1
-1
0.0.1-beta1
npm publish --tag=beta1
npm i [email protected]
所以当我们想用 npm publish 发布一个测试包的时候,我们可以采取 npm publish --tag=beta1 这种来发布,只在版本号后面带一个 -,并不保险,别人也可能直接安装上这个版本的包
-
The text was updated successfully, but these errors were encountered:
No branches or pull requests
假如,我们有个 npm 包叫
test
0.0.1
这种的时候,我们执行npm publish
,然后我们npm i test
,装上的是0.0.1
版本的 test 包。0.0.1-1
这种的时候,我们执行npm publish
,然后我们npm i test
。分两种情况1)我们之前没有安装过
test
包,那么会安装上0.0.1-1
2)我们之前已经安装过
test
包了,那么还是会安装上0.0.1
,并不会安装上带有-1
的版本的包0.0.1-beta1
,我们执行npm publish --tag=beta1
,然后我们npm i test
,不管之前我们有没有装过test
包,都不会安装上0.0.1-beta1
,除非我们安装指定的版本npm i [email protected]
所以当我们想用
npm publish
发布一个测试包的时候,我们可以采取npm publish --tag=beta1
这种来发布,只在版本号后面带一个-
,并不保险,别人也可能直接安装上这个版本的包The text was updated successfully, but these errors were encountered: