nrm 是什么
nrm 是一个 NPM 源管理器,允许你快速地在如下 NPM 源间切换,很方便:
nrm 之旅
安装
npm install -g nrm
使用
nrm ls
//带 * 的是当前使用的源,上面的输出表明当前源是官方源。
* npm ---- https://registry.npmjs.org/
cnpm --- http://r.cnpmjs.org/
taobao - http://registry.npm.taobao.org/
eu ----- http://registry.npmjs.eu/
au ----- http://registry.npmjs.org.au/
sl ----- http://npm.strongloop.com/
nj ----- https://registry.nodejitsu.com/
切换
//切换到淘宝
nrm use taobao
Registry has been set to: https://registry.npm.taobao.org/
测速
nrm test
npm ---- 1281ms
cnpm --- 194ms
* taobao - 125ms
nj ----- Fetch Error
rednpm - 254ms
npmMirror 1072ms
edunpm - Fetch Error