nrm -- NPM registry 管理工具

最近发现使用npm下载包有一个很不方便的地方,每次想指定源下载都需要npm install –registry=http://xxxregistry.com,为了解决此类问题,因此总结一下nrm的使用方法。

1、安装:

1
    sudo npm install nrm -g

图片

2、命令集合及作用:

1
    nrm ls //查看源

图片

1
    nrm current //查看当前源

图片

1
    nrm use cnpm //切换源

图片

1
2
    nrm add local http://172.17.44.223:7000 //添加源
    nrm use local  //切换源

图片

1
2
    nrm test npm //测试npm 速度
    nrm test cnpm //测试cnpm  速度

图片

1
    nrm del local //删除源

3、npm 查看源

1
2
    npm config get registry
    npm config list