nrm是npm registry的管理工具,用来查看或切换当前使用的registry
1、安装
npm install -g nrm
2、使用介绍
2.1、查看系统配置了哪些registry
安装好之后默认会有下面这些镜像,可以使用nrm ls来查看
$nrm ls
* npm ---- https://registry.npmjs.org/ cnpm --- http://r.cnpmjs.org/ eu ----- http://registry.npmjs.eu/ au ----- http://registry.npmjs.org.au/ sl ----- http://npm.strongloop.com/ nj ----- https://registry.nodejitsu.com/
2.2、添加一个地址
$nrm add 名称 http://XXXXX
可以给每一个镜像地址取一个名称,便于下面的使用
2.3、使用
$nrm use 名称
3、常见命令
nrm help // show help
nrm list // show all registries
nrm use cnpm // switch to cnpm
nrm home // go to a registry home page