nrm —— 快速切换 NPM 源

nrm 为开源软件,使用MIT许可,项目主页:https://github.com/Pana/nrm
NPM源管理器,允许你快速地在如下NPM源间切换:

[shell]npm
cnpm
strongloop
european
australia
nodejitsu
taobao[/shell]

安装:

[shell]npm install -g nrm[/shell]

使用:
列出可选的源:

[shell]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/[/shell]

切换到taobao

[shell]nrm use taobao
Registry has been set to: http://registry.npm.taobao.org/[/shell]

增加源
你可以增加定制的源,特别适用于添加企业内部的私有源。

[shell]nrm add <registry> <url> [home][/shell]

删除源

[shell]nrm del <registry>[/shell]

测试速度
你还可以通过

[shell]nrm test[/shell]

测试相应源的响应时间。

用例说明:

[shell]Usage: nrm [options] [command]

Commands:

ls list all the registries
use <registry> change registry to registry
add <registry> <url> [home] add one custom registry
del <registry> delete one custom registry
home <registry> [browser] open the homepage of registry with optional browser
test [registry] show the response time for one or all registries
help print this help

Options:

-h, –help output usage information
-V, –version output the version number[/shell]

nrm —— 快速切换 NPM 源》有1个想法

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据