{"name":"name202403311748","version":"1.0.0","description":"1","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC"}
PS E:\code\npm\npm-test>npm adduser
npm notice Log in on https://registry.npmjs.org/
Create your account at:
https://www.npmjs.com/login?next=/login/cli/7a72796a-81de-48e2-9b31-8c2724417e38
Press ENTER to openin the browser...
PS E:\code\npm\npm-test>npminstall name202403311748
added 1 package, and audited 2 packages in 1s
found 0 vulnerabilities
安装后可以在node_modules文件夹中看到安装的插件,和package.json中的插件包名
更新npm发布包
修改版本号(版本号不能和上次发布的版本号重复,否则发布时会报错) npm version patch
PS E:\code\npm\npm-test>npm version patch
v1.0.1
说明
命令
查看当前npm包的版本
npm version
修改npm包的版本为1.0.0
npm version 1.0.0
修改npm包的版本为补丁版本+1(v1.0.0->v1.0.1)
npm version patch
修改npm包的版本为小版本+1(v1.0.0->v1.1.0)
npm version minor
修改npm包的版本为大版本+1(v1.0.0->v2.0.0)
npm version major
# 查看当前npm包的版本npm version# 修改npm包的版本为1.0.0npm version 1.0.0# 修改npm包的版本为补丁版本+1(v1.0.0->v1.0.1)npm version patch# 修改npm包的版本为小版本+1(v1.0.0->v1.1.0)npm version minor# 修改npm包的版本为大版本+1(v1.0.0->v2.0.0)npm version major