nrm -- NPM registry 管理工具

来源:互联网 发布:ps制作淘宝宝贝主图 编辑:程序博客网 时间:2024/05/16 08:49

发布于 3 年前 作者 Pana 14852 次浏览 最后一次编辑是 6 个月前

开发的npm registry 管理工具 nrm, 能够查看和切换当前使用的registry, 最近NPM经常 down 掉, 这个还是很有用的哈哈

Install

$npm install -g nrm

Example

$ nrm ls* npm ---- https://registry.npmjs.org/  cnpm --- http://r.cnpmjs.org/  eu ----- http://registry.npmjs.eu/  au ----- http://registry.npmjs.org.au/  sl ----- http://npm.strongloop.com/  nj ----- https://registry.nodejitsu.com/

$ nrm use cnpm //switch registry to cnpm

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

cmd

nrm help // show helpnrm list // show all registriesnrm use cnpm // switch to cnpmnrm home // go to a registry home page

Registries

  • npm
  • cnpm
  • strongloop
  • european
  • australia
  • nodejitsu

镜像切换

永久使用镜像命令:

npm config set registry https://registry.npm.taobao.org

临时使用镜像命令:

npm --registry "http://npm.hacknodejs.com/" install underscore

参考:http://cnodejs.org/topic/5326e78c434e04172c006826


0 0
原创粉丝点击