npm镜像插件nrm

1,nrm的安装

npm install -g nrm --registry=https://registry.npm.taobao.org

查看当前镜像

nrm current

查看所有镜像

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/

选择镜像

nrm use taobao
//return
   Registry has been set to: https://registry.npm.taobao.org/

再来查看一下当前的镜像

nrm current
taobao //return

或者用nrm ls 查看一下,当前的镜像前面会有星标*

nrm ls
//return
  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/

10 Jan 2017