Nrm--Npm 源管理工具
本文章距离最后一次更新已经过去了 1772 天,文章内容可能已经变得不可靠或者版本不适配,请谨慎阅读。
nrm ls
前情提要
在围绕 gulp 的插件无法安装的问题,讨论到了 npm 源的问题,群里有大佬指出了可以用 nrm ,截图为证:
image-20200726103035073
各种骚操作搜索一番,了解到这个实属好用的工具,安装体验一番,就在此记录一下使用方法。
安装
shell
1 | npm install -g nrm |
使用
查看源
shell
1 | nrm ls |
nrm ls
前面带
*
的是正在使用的源
切换源
shell
1 | nrm use <源名称> |
例如:nrm use taobao
:
taobao
添加源
shell
1 | nrm add <registry> <url> [home] |
registry
为源的名称,url
为源的地址,home
为源的主页,可省略,设置之后可以执行nrm home
来查看主页
删除源
shell
1 | nrm del <registry> |
测试源响应时间
shell
1 | nrm test <registry> |
<registry>
参数可不写,即测试所有源的响应速度:
nrm test
okk
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Ordis'Blog!
评论