安装 verdaccio
npm install -g verdaccio
启动 verdaccio
verdaccio
打开 http://localhost:4873 ,可以看到一下指引
登录注册用户
npm adduser --registry http://localhost:4873
发布
cd到要发布的私有npm项目,发布npm包
npm publish --registry http://localhost:4873
安装 nrm 管理 npm源
npm install -g nrm
nrm
新增私有npm源
nrm add test http://localhost:4873
使用私有npm源
nrm use test
查看npm源列表
nrm ls
登陆私有库账号
npm login test [前面登陆注册的用户名]