nrm -- npm镜像源管理工具

来源:互联网 发布:淘宝运营方案怎么写 编辑:程序博客网 时间:2024/05/22 04:31

安装

npm install -g nrm

基本命令

-V ------------------  nrm版本信息ls ------------------  列出所有可用镜像current -------------  当前所使用的镜像use <registry> ------  切换使用的镜像 registry指镜像的名称add <registry> <url> - 添加镜像del <registry> ------- 删除镜像home <registry>test <registry> -----  测试速度help |  -h ----------  帮助,列出所有命令

使用示例

  • 列出可用镜像
nrm ls  npm ------- https://registry.npmjs.org/  cnpm ------ http://r.cnpmjs.org/* taobao ---- https://registry.npm.taobao.org/  nj -------- https://registry.nodejitsu.com/  rednpm ---- http://registry.mirror.cqupt.edu.cn/  npmMirror - https://skimdb.npmjs.com/registry/  edunpm ---- http://registry.enpmjs.org/

带【*】表示当前使用的源,以上表示当前使用的是淘宝的镜像

  • 切换镜像源
nrm use taobao

将镜像切换到【淘宝镜像】

  • 测试速度
nrm test npm npm ---- 9497ms

个人感觉挺好用的,有漏掉的欢迎补充!!!

原创粉丝点击