前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >使用nrm管理npm仓库

使用nrm管理npm仓库

作者头像
kongxx
发布2018-05-14 12:05:42
1.4K0
发布2018-05-14 12:05:42
举报

用npm装包的时候,经常碰到太慢或者npm官网被墙的情况,有时候凑合一下就改一下 "~/.npmrc" 文件,但是经常改来改去也挺麻烦的,于是找到了可以使用nrm来管理npm仓库。

安装

sudo npm install -g nrm

查询仓库

使用 “nrm ls” 查看所有仓库

$ 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/

其中带 “*” 的表示当前正在使用的仓库。

添加删除仓库

使用 add 或 del 可以添加或删除仓库。比如:

$ nrm add myrepos ...
$ nrm del myrepos

切换仓库

使用 use 来选择当前使用那个仓库。比如:

$ nrm use taobao
...

$ 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
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2017.06.16 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 安装
  • 查询仓库
  • 添加删除仓库
  • 切换仓库
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档