nrm 的使用方法

nrm 的使用方法

NRM - NPM Registry Manager,是一个管理 npm 下载源的工具。

下载

$ npm install -g nrm

常用命令

  • 列出 npm 当前使用的下载源

    $ nrm ls
    
      npm ---- https://registry.npmjs.org/
      cnpm --- http://r.cnpmjs.org/
    * taobao - https://registry.npm.taobao.org/
      nj ----- https://registry.nodejitsu.com/
      npmMirror  https://skimdb.npmjs.com/registry/
      edunpm - http://registry.enpmjs.org/
    
    
  • 将 npm 下载源设置为指定项的源(nrm use REGISTRY_NAME

    # 使用 cnpm 的源作为 npm 的下载源
    $ nrm use cnpm
    
        Registry has been set to: http://r.cnpmjs.org/
    
    
  • 测试响应时间(nrm test REGISTRY_NAME

    # 测试与 taobao 源的响应时间
    $ nrm test taobao
    
      taobao --- 470ms
    
    
  • 查看当前 nrm 的版本 nrm -vnrm --version

  • 查看 nrm 的帮助手册 nrmnrm -hnrm --help

posted @ 2019-04-21 21:54  衣禾曰  阅读(244)  评论(0编辑  收藏  举报