zoukankan      html  css  js  c++  java
  • yarn 基本使用

    1、初始化

    yarn init

    2、添加依赖包

    yarn  add [package]
    
    yarn add [package]@[version]
    
    yarn add [package]@[tag]

    3、安装项目依赖包

    yarn 或者 yarn install

    4、npm 与 yarn命令比较

    
    
    NPM                                         YARN                                         说明

    npm init                                yarn init                                   初始化某个项目

    npm install                            yarn install                              默认的安装依赖操作

    npm install pluginName —save             yarn add pluginName                         安装某个依赖,并且默认保存到package.

    npm uninstall pluginName —save          yarn remove pluginName                      移除某个依赖项目

    npm install pluginName —save-dev        yarn add pluginName —dev                  安装某个开发时依赖项目

    npm update pluginName —save             yarn upgrade pluginName                    更新某个依赖项目

    npm install pluginName --global           yarn global add pluginName                安装某个全局依赖项目

    npm publish/login/logout             yarn publish/login/logout              发布/登录/登出,一系列NPM Registry操作

    npm run/test                              yarn run/test                             运行某个命令
     
  • 相关阅读:
    实现类似“添加扩展程序…”的设计时支持
    为什么word2007写的文章不能显示在首页
    (翻译)LearnVSXNow!#4 创建一个带有工具窗的Package
    (翻译)LearnVSXNow!#1 如何开始VSX开发?
    测试Windows live writer 发日志
    (翻译)LearnVSXNow!#3 创建一个带有简单命令的Package
    styleSheetTheme和them
    (翻译)LearnVSXNow!#2 创建一个空的VS Package
    VS 2008 Package 备忘
    通用树形表查询SQL
  • 原文地址:https://www.cnblogs.com/-roc/p/14500324.html
Copyright © 2011-2022 走看看