npm常用命令

 

http://javascript.ruanyifeng.com/nodejs/npm.html#toc23

 

https://docs.npmjs.com/getting-started/semantic-versioning

 

npm i

npm i 

npm uninstall 

npm uninstall 

npm outdated

npm update

-g    --save   --save-dev

npm -v

 

发包

npm adduser

npm login

npm publish

npm version patch

git push --tag

 

 

When you make changes, you can update the package using npm version <update_type>, where update_type is one of the semantic versioning release types, patch, minor, or major. This command will change the version number inpackage.json. Note that this will also add a tag with this release number to your git repository if you have one.

After updating the version number, you can npm publish again.

Test: Go to https://npmjs.com/package/<package>. The package number should be updated.

The README displayed on the site will not be updated unless a new version of your package is published, so you would need to run npm version patch and npm publish to have a documentation fix displayed on the site.

 

 

 

After this, changes should be handled as follows:

  • Bug fixes and other minor changes: Patch release, increment the last number, e.g. 1.0.1
  • New features which don't break existing features: Minor release, increment the middle number, e.g. 1.1.0
  • Changes which break backwards compatibility: Major release, increment the first number, e.g. 2.0.0

 

清除重复引用

npm dedupe

https://docs.npmjs.com/how-npm-works/npm3-dupe

 

 

版本

具体见:https://docs.npmjs.com/misc/semver

~   允许patch

^ 允许小版本

https://docs.npmjs.com/misc/semver

转载于:https://www.cnblogs.com/520yang/articles/5828978.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值