zoukankan      html  css  js  c++  java
  • nrm——npm的镜像源管理工具

    1.nrm

    nrm(npm registry manager )是npm的镜像源管理工具,有时候国外资源太慢,使用这个就可以快速地在 npm 源间切换

    2.安装nrm

    在命令行执行命令,npm install -g nrm,全局安装nrm。

    3.使用

    执行命令nrm ls查看可选的源。

    *npm -------- https://registry.npmjs.org/
    
     yarn ------- https://registry.yarnpkg.com/
    
     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/
    

    其中,带*的是当前使用的源,上面的输出表明当前源是官方源。

    5.切换

    如果要切换到taobao源,执行命令nrm use taobao

    6.增加

    你可以增加定制的源,特别适用于添加企业内部的私有源,执行命令 nrm add <registry> <url>,其中reigstry为源名url为源的路径

    7.删除

    执行命令nrm del <registry>删除对应的源。

    8.测试速度

    你还可以通过 nrm test <registry>测试相应源的响应时间。

    nrm test npm    
    
  • 相关阅读:
    Postman post csrf_token
    CBV
    nginx+uWSGI+django部署web服务器
    JS绘图
    get_字段_display()
    limit_choices_to
    window.onload=function(){};
    模拟百度搜索项目
    事件冒泡
    解绑事件
  • 原文地址:https://www.cnblogs.com/qiqi715/p/12455639.html
Copyright © 2011-2022 走看看