npm config get registry
https://registry.npmjs.org/
複製代碼
npm config set registry https://registry.npm.taobao.org/
複製代碼
npm i nrm -g
nrm -V
1.2.1
複製代碼
nrm ls
* npm -------- https://registry.npmjs.org/
yarn ------- https://registry.yarnpkg.com/
cnpm ------- http://r.cnpmjs.org/
taobao ----- https://registry.npm.taobao.org/
nj --------- https://registry.nodejitsu.com/
npmMirror -- https://skimdb.npmjs.com/registry/
edunpm ----- http://registry.enpmjs.org/
複製代碼
nrm 列出了當前可切換使用的源, 左邊帶星號的表示當前正在使用的源。node
nrm use nj
Registry has been set to: https://registry.nodejitsu.com/
複製代碼
nrm test yarn
cnpm --- 208ms
nrm test taobao
taobao - 102ms
複製代碼