美文网首页饥人谷技术博客
nrm 设置 npm 命令的路径

nrm 设置 npm 命令的路径

作者: 辉夜乀 | 来源:发表于2017-06-08 18:50 被阅读158次

    nrm 是什么

    nrm 是一个 NPM 源管理器,允许你快速地在如下 NPM 源间切换,很方便:

    nrm 之旅

    安装

    npm install -g nrm
    

    使用

    nrm ls                                                                                                                                    
    //带 * 的是当前使用的源,上面的输出表明当前源是官方源。
    
    * npm ---- https://registry.npmjs.org/
      cnpm --- http://r.cnpmjs.org/
      taobao - http://registry.npm.taobao.org/
      eu ----- http://registry.npmjs.eu/
      au ----- http://registry.npmjs.org.au/
      sl ----- http://npm.strongloop.com/
      nj ----- https://registry.nodejitsu.com/
    

    切换

    //切换到淘宝
    nrm use taobao
    
       Registry has been set to: https://registry.npm.taobao.org/
    

    测速

    nrm test
    
      npm ---- 1281ms
      cnpm --- 194ms
    * taobao - 125ms
      nj ----- Fetch Error
      rednpm - 254ms
      npmMirror  1072ms
      edunpm - Fetch Error
    
    

    相关文章

      网友评论

        本文标题:nrm 设置 npm 命令的路径

        本文链接:https://www.haomeiwen.com/subject/jmptqxtx.html