1. nrm是什么?
- nrm可以帮助你不同的NPM登记之间方便,快捷开关,现在包括:npm,cnpm,taobao,nj(nodejitsu)
- nrm本身不是网站,更不提供npm镜像仓储、
- 还可以进行公司内部源址配置
2. nrm安装使用
2.1 nrm安装
$ npm install -g nrm
2.2 常用命令
- 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/ - nrm add 增加镜像源
nrm add 自定义镜像源名 设置的镜像地址
nrm add NewRegistryName registryUrl - nrm del 删除镜像源
2.3 其他命令
注意/:
mac本执行需要加上sudo