使用 nrm 管理 npm 源

安装

1
➜  ~ npm i nrm -g

使用

1
2
3
4
5
6
7
8
9
10
11
12
# 查看 nrm 内置的几个 npm 源
➜ ~ nrm ls
npm ---------- https://registry.npmjs.org/
yarn --------- https://registry.yarnpkg.com/
tencent ------ https://mirrors.cloud.tencent.com/npm/
cnpm --------- https://r.cnpmjs.org/
* taobao ------- https://registry.npmmirror.com/
npmMirror ---- https://skimdb.npmjs.com/registry/

# 切换源
➜ ~ nrm use cnpm
Registry has been set to: http://r.cnpmjs.org/