排名
                
                
                    6
                
            
                    文章
                
                
                    6
                
            
                    粉丝
                
                
                    16
                
            
                    评论
                
                
                    8
                
            
            {{item.articleTitle}}
            
    {{item.blogName}} : {{item.content}}
        
            ICP备案  :渝ICP备18016597号-1
        
        
            网站信息:2018-2025TNBLOG.NET
        
        
            技术交流:群号656732739
        
        
            联系我们:contact@tnblog.net
        
        
            公网安备: 50010702506256
50010702506256
        
     50010702506256
50010702506256
         
        
            欢迎加群交流技术
        
     分类:
    前端
    
    分类:
    前端
现在基本上都在用yarn代替npm,管理包比较方便,速度也比较快些,现记录常用命令
| 作用 | npm | yarn | 
|---|---|---|
| 安装 | npm install(i) | yarn | 
| 卸载 | npm uninstall(un) | yarn remove | 
| 全局安装 | npm install xxx –-global(-g) | yarn global add xxx | 
| 安装包 | npm install xxx –save(-S) | yarn add xxx | 
| 开发模式安装包 | npm install xxx –save-dev(-D) | yarn add xx -dev(-D) | 
| 更新 | npm update –save | yarn upgrade | 
| 全局更新 | npm update –global | yarn global upgrade | 
| 卸载 | npm uninstall [–save/–save-dev] | yarn remove xxx | 
| 清除卸载 | npm cache clean | yarn cache clean | 
| 更重装 | rm -rf node_modules && npm install | yarn upgrade | 
评价
     
         
         
        