环境搭建比较简单,仓库和角色创建完毕后,进行如下操作
# 获取之前的仓库路径
npm config get registry
# 设置仓库路径为taobao
npm config set registry https://registry.npm.taobao.org/
# 设置仓库路径为nexus私服地址
npm config set registry http://localhost:8081/repository/hhb-group/
# 登陆nexus私服
npm login -registry=http://localhost:8081/repository/hhb-hosted/
# 发布到nexus私服
npm publish -registry=http://localhost:8081/repository/hhb-hosted/
# 从私服拉取库
npm install typescript