开发的npm registry 管理工具 nrm, 能够查看和切换当前使用的registry, 使用起来还是很方便的,可以随意切换,包括自定义一些私有npm服务的,还是很有用的。
安装
npm install -g nrm
安装 nrm NPM registry 管理工具
添加
nrm add testnpm http://test.com:4873/
增加私有npm服务器
查看
nrm ls
npm ---- https://registry.npmjs.org/
cnpm --- http://r.cnpmjs.org/
* taobao - https://registry.npm.taobao.org/
nj ----- https://registry.nodejitsu.com/
rednpm - http://registry.mirror.cqupt.edu.cn/
npmMirror https://skimdb.npmjs.com/registry/
edunpm - http://registry.enpmjs.org/
testnpm http://test.com:4873/
查看已经安装的npm服务,当前正在使用的是taobao源,加 * 的即为当前使用
切换
nrm use testnpm
npm ---- https://registry.npmjs.org/
cnpm --- http://r.cnpmjs.org/
taobao - https://registry.npm.taobao.org/
nj ----- https://registry.nodejitsu.com/
rednpm - http://registry.mirror.cqupt.edu.cn/
npmMirror https://skimdb.npmjs.com/registry/
edunpm - http://registry.enpmjs.org/
* testnpm http://test.com:4873/
执行命令后,当前npm服务就切换为某个源服务