vue-cli introduction and installation

vue-cli introduction and installation

1. Introduction

vue-cli is a tool that is deeply integrated with vue . It can help us create vue projects quickly and create some scaffolding-related codes for us. When you really use vue to develop projects, you use vue-cli to create projects.

2. Introduction to vue-cli

Vue CLI is a complete system for rapid development based on Vue.js , providing:

  • Interactive project scaffolding implemented by @vue/cli .
  • Zero configuration prototype development achieved through @vue/cli + @vue/cli-service-global .
  • A runtime dependency (@vue/cli-service), that:
  • (1) Upgradable;
  • (2) Built on webpack with reasonable default configuration; 9
  • (3) Can be configured through the configuration file in the project;
  • (4) Can be extended through plug-ins.
  • A rich collection of official plugins that integrates the best tools in the front-end ecosystem.
  • A fully graphical user interface for creating and managing Vue.js projects.

Vue CLI is committed to standardizing the tooling foundation in the Vue ecosystem. It ensures that various build tools can be smoothly connected based on intelligent default configurations, so that you can focus on writing applications instead of spending days worrying about configuration issues. At the same time, it also provides flexibility to adjust the configuration of each tool without eject .

2.1 CLI

CLI (@vue/cli) is a globally installed npm package that provides vue commands in the terminal. It can quickly build a new project through vue create , or build a prototype of new ideas directly through vue serve . You can also manage all your projects through a graphical interface using vue ui .

2.2 CLI Service

CLI (@vue/cli-service) is a development environment dependency. It is an npm package that is installed locally in every project created by @vue/cli .
CLI server is built on top of webpack and webpack-dev-server . It contains:

  • Core service for loading other CLI plugins;
  • An internal webpack configuration optimized for most applications;
  • The vue-cli-service command within the project provides serve , build , and inspect commands.

2.3 CLI plugin

CLI plugins are npm packages that provide optional functionality to your Vue projects, such as Babel/TypeScript transpilation, ESLint integration, unit testing, end-to-end testing, etc. Vue CLI plugins have names starting with @vue/cli-plugin- (built-in plugins) or vue-cli-plugin - (community plugins) and are very easy to use.

When you run the vue-cli-service command inside your project, it will automatically resolve and load all CLI plugins listed in package.json .

Plugins can be created as part of the project creation process, or added to the project at a later stage. They can also be grouped into a set of reusable preset .

3. @vue-cli installation

Vue CLI 4.x requires Node.js v8.9 or higher (v10 or higher is recommended). You can use n , nvm , or nvm-windows to manage multiple Node versions on the same computer.

The installation command is as follows:

npm install -g @vue/cli

You can use this command to check whether its version is correct

vue --version

This is the end of this article about the introduction and installation of vue-cli. For more relevant vue-cli introduction and installation content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Install Vue cli3 globally and continue to use Vue-cli2.x
  • How to install multiple versions of Vue-CLI
  • Solve the problem of unsuccessful installation of [email protected] and build ts-vue project
  • Detailed explanation of vue-cli scaffolding installation
  • Installation method in vue-cli (detailed steps with pictures and text)
  • Detailed steps for installing and using vue-cli
  • How to install vue and vue-cli with npm and create a project with webpack
  • Vue-cli scaffolding installation tutorial diagram
  • Solution to error -4058 when installing vue-cli
  • Vue learning notes advanced version of vue-cli installation and introduction

<<:  Example code for using CSS to implement the style of logistics progress

>>:  Docker image import and export code examples

Recommend

Detailed explanation of Mysql transaction isolation level read commit

View MySQL transaction isolation level mysql> ...

Zabbix implements monitoring of multiple mysql processes

Three MySQL instance processes are started on one...

CSS3 to achieve floating cloud animation

Operation effect html <head> <meta chars...

Exploration and correction of the weird behavior of parseInt() in js

Background: I wonder if you have noticed that if ...

Let you understand the working principle of JavaScript

Table of contents Browser kernel JavaScript Engin...

Complete steps of centos cloning linux virtual machine sharing

Preface When a Linux is fully set up, you can use...

Detailed explanation of HTML basics (Part 2)

1. List The list ul container is loaded with a fo...

Detailed Analysis of the Selection of MySQL Common Index and Unique Index

Suppose a user management system where each perso...

CSS style does not work (the most complete solution summary in history)

When we write pages, we sometimes find that the C...

Tutorial on installing mysql5.7.18 on mac os10.12

I searched the entire web and found all kinds of ...

Tutorial on installing MySQL 5.7.28 on CentOS 6.2 (mysql notes)

1. Environmental Preparation 1.MySQL installation...

Analysis of MySQL general query log and slow query log

The logs in MySQL include: error log, binary log,...

MYSQL stored procedures, that is, a summary of common logical knowledge points

Mysql stored procedure 1. Create stored procedure...