发布NPM包

发布NPM包

  1. 在Nexus 3新建一个hosted类型的NPM包仓库,取名为hosted-npm
  2. 分配一个专门用于部署NPM包的用户
  3. 激活Nexus3中安全域 npm Bearer Token Realm
  4. 发布
1
2
3
4
5
cd ${YourProjectBaseDir}
#登录
npm login --registry=http://${YourNexusHost}/repository/hosted-npm/
#发布
npm publish --registry=http://${YourNexusHost}/repository/hosted-npm/