node-nrm

91 阅读1分钟
基础操作

# 全局安装

npm install nrm -``g -``-``save

# nrm有一些默认配置,用nrm ls命令查看默认配置,带*号即为当前使用的配置

nrm ls

# 查看当前使用的是哪个源

nrm current

# 切到源http://r.cnpmjs.org/,命令:nrm use 源的别名,即

nrm use cnpm

# 执行成功提示

Registry has been set to: http:``/``/``r.cnpmjs.org``/

# 用nrm add 命令添加公司私有npm源,如http://registry.npm.360.org(随便写的),起个别名叫qihoo

nrm add qihoo http:``/``/``registry.npm.``360.org

# 测试下速度

nrm test npm

# 输出

npm -``-``-``- 1547ms

# 删npm源配置

nrm del qihoo