Complete list of yarn commands
Complete list of commonly used yarn commands, specific code examples are required
With the rapid development of front-end development, JavaScript, as a mainstream programming language, is also constantly updated and Evolution. As a modern JavaScript package management tool, yarn plays an important role in project development. Yarn helps developers manage and maintain project dependencies and improve development efficiency by providing a series of commands.
This article will introduce some commonly used yarn commands and provide specific code examples to help developers better understand and use yarn.
- Initialize the project
To use yarn to initialize a new project, you can enter the following command:
yarn init
This command will generate a ## in the current directory. #package.json file, which is used to record project-related information and dependencies.
- Installing dependencies
add command. For example, to install
axios dependencies, you can enter the following command:
yarn add axios
devDependencies, you can use
--dev Parameters:
yarn add jest --dev
- Upgrade dependencies
upgrade command. For example, to upgrade
axios dependencies to the latest version, enter the following command:
yarn upgrade axios
- Remove dependencies
remove command to remove it. For example, to remove
axios dependencies, you can enter the following command:
yarn remove axios
- Install all dependencies of the project
installCommand to install all dependencies of the project at once. For example, enter the following command:
yarn install
- Display dependency tree
list command to display the tree structure of project dependencies. For example, enter the following command:
yarn list
- Run script command
package.json file, you can define some script commands for execution specific tasks. These script commands can be run using the
run command. For example, to run a script command named
build, enter the following command:
yarn run build
- Clear cache
cache clean command to clear the cache. For example, enter the following command:
yarn cache clean
The above is the detailed content of Complete list of yarn commands. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The i5-13490F is a CPU only sold in mainland China. It has just been launched recently. Its performance is slightly improved compared to the 13400F. It performs very well in games and brings us low power consumption and high performance. Comprehensive evaluation of i5-13490F processor parameters: 1. The performance of the i5-13490F processor is improved by 0.2GHz compared to the i5-13400F; the level 3 cache is increased to 24MB. 2. The improvement of single-core performance and level-3 cache will help gamers in terms of performance. 3. At 2K resolution, i5-13490F performs slightly better in games than i5-13400F. i7-13490F Parameter Evaluation Complete Performance Benchmarks: CPU-z’s benchmark scores reached single

WindowsCMD (Windows Command Prompt) is a command line tool in the Windows operating system. It operates through the command line and can complete many system management, file management, network management and other tasks. This article will introduce readers to the complete list of Windows CMD commands, including commonly used commands and their functions. 1. Commonly used commands cd command: used to switch the current directory. dir command: displays files and subdirectories in the current directory. mkdir command: Create a new directory. rmd

Maven常用命令:1、mvn compile;2、mvn clean;3、mvn test;4、mvn package;5、mvn install;6、mvn deploy;7、mvn site;8、mvn versions:set;9、mvn dependency:tree;10、mvn archetype:generate;11、mvn exec:java等等。

Redis is a high-performance NoSQL (non-relational database) technology that uses memory storage, so its read and write speeds are very fast. The common commands and syntax of Redis can help developers better understand and use this technology. The common commands and syntax of Redis will be introduced below. Data type Redis supports the following five data types: String: can store strings, integers and floating point numbers. List: Can store an ordered list of strings. Set(

A complete list of Django version query methods, requiring specific code examples. Overview: Django is an open source web application framework that is widely used in web development. It is simple, flexible, and efficient, and can help developers quickly build powerful web applications. For developers, it is very important to understand the Django version currently used and the related query methods. This article will introduce in detail the method of Django version query and give specific code examples to help readers better apply it.

A list of commonly used commands in Go language. As a fast and reliable programming language, Go language has been widely praised and applied. In daily development, it is very important to master some commonly used commands. This article will introduce some common commands in Go language and provide specific code examples to help readers better understand and use them. gorun uses the gorun command to run Go programs directly. Enter the following code example at the command line: gorunmain.go This will compile and run the Go program named main.go

PHP is a popular web programming language that has many built-in functions and extensions that allow developers to write web applications easily. In this article, we will introduce some PHP function libraries, which have both built-in functions and third-party extensions. 1. Built-in function library String operation function library The string function library in PHP includes commonly used operation functions, such as string interception, replacement, matching, comparison, etc. Commonly used functions: strlen($str): returns the length of the string. substr($str,

1. Many times, you need to know what large files there are in the current system, for example, the file size exceeds 100M or 1G (the threshold depends on the specific situation). So how to search these large files? #For example: I want to search for files exceeding 900M in the current directory.-typef-size+900M-print0|xargs-0du-h2. Sometimes there is a disk space alarm, but you usually neglect to manage and monitor files. growth, then I need to quickly understand which directories have become larger, so at this time we can use the du command to help us solve this problem. #For example: I want to check which directory under the root directory has become larger (of course I think it must be /var) cd/du
