| npm命令效果 | npm命令 |
|---|---|
| 修改registry地址 | npm set registry registry.npm.taobao.org/ |
| 删除registry地址 | npm config rm registry registry.npm.taobao.org/ |
| 查看npm源地址 | npm config list |
nrm: 用来管理和快速切换私人配置的registry
| nrm命令效果 | nrm命令 |
|---|---|
| 全局安装 | npm install nrm -g --save |
| 查看默认配置,带*号即为当前使用的配置 | nrm ls |
| 查看当前使用的是哪个源 | nrm current |
| 切到源r.cnpmjs.org/,命令:nrm use 源的别名 | nrm use cnpm |
| 添加公司私有npm源 | nrm add qihoo npmrepo.corp.qunar.com/ |
| 测试速度test+别名 | nrm test npm |
| 删公司npm源配置 | nrm del qnpm |