安裝 nrm 自由切換 npm 源 國(guó)內(nèi)鏡像提升下載速度
基于 npm ,全局安裝以后,你開源無縫快速切換幾個(gè)源,提高下載速度,拒絕 loading !
安裝
npm install -g nrm
幫助:
>nrm -h
Usage: nrm [options] [command]
Commands:
ls list all the registries
current show current registry name
use <registry> change registry to registry
add <registry> <url> [home] add one custom registry
del|rm <registry> delete one custom registry
home <registry> [browser] open the homepage of registry with optional browser
test [registry] show response time for specific or all registries
help print this help
Options:
-h, --help output usage information
-V, --version output the version number
查看當(dāng)前支持切換的源
>nrm ls
npm ---- https://registry.npmjs.org/
cnpm --- http://r.cnpmjs.org/
* taobao - http://registry.npm.taobao.org/
edunpm - http://registry.enpmjs.org/
eu ----- http://registry.npmjs.eu/
au ----- http://registry.npmjs.org.au/
sl ----- http://npm.strongloop.com/
nj ----- https://registry.nodejitsu.com/
pt ----- http://registry.npmjs.pt/
** 號(hào)標(biāo)記出了當(dāng)前我使用的源**
切換指定的源
>nrm use taboo