基于 npm ,全局安装以后,你开源无缝快速切换几个源,提高下载速度,拒绝 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
查看当前支持切换的源
>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/
** 号标记出了当前我使用的源**
切换指定的源
>nrm use taboo
网友评论