vue-cli4.5.x quickly builds a project

vue-cli4.5.x quickly builds a project

1. Install vue-cli

npm i @vue/cli -g

2. Create a project

vue-cli will create a complete project folder, including src, etc. We only need to cd into the folder where we plan to place the project file and execute the following code;

1. Generate project files;

Terminal input:

vue create projectname

2. Select the generation configuration method

Select the bottom item here for manual configuration
(If you like to use eslint, just choose vue3)

insert image description here

3. Plugin Selection

Select the plugin you need, use the up and down arrows to move, and use the spacebar to switch the selected state.

insert image description here

Did you make the wrong choice or miss one? Don’t worry, you can still modify the plugin configuration through the Vue UI after the build is completed (as described below)

I am not very familiar with ESLint, so I won’t show off here...
The lowest level of unit testing and end-to-end testing (E to E Testing) can be started if there is a need;

insert image description here

4. Single item configuration

Select the first option "Choose Vue version" to configure it individually:
Enable HTML5 history mode for vue-router?

insert image description here

This is recommended to enable, which will make your URL cleaner and more readable;
In SPA pages, many methods rely on HTML5 history mode;

How are you going to store these config files for things like babel & eslint?

insert image description here

Here I recommend the first option... Generate a separate configuration file, so that when you modify it, you only need to find the corresponding configuration file to modify the corresponding configuration;

OK, do you plan to use the configuration of this build project in the future?

insert image description here

It's up to you to decide...
If you select Yes, the fourth option will appear next time you execute the first step, which is your customized configuration method.

Give your own configuration a name: projectname

insert image description here

5. Choose a package management tool

You will be asked to choose between npm or yarn. I did not show it here and used npm directly, which is weird.
Just choose the one you want to use.

insert image description here

This completes the creation.

Then let’s run it and see!

npm run serve

Enter the corresponding port and you can see the initial interface of Vue.

insert image description here

3. VueUI modification configuration

Open cmd, enter "vue ui" and wait for the GUI service to start, and a UI interface based on the local service will automatically open

insert image description here

Import your project file, and then you can quickly run the project, install the plugin, uninstall the plugin, etc. under the plugin category on the left.

Add-on - Deleting saved configuration options

If you save the configuration, there will be one more configuration of your own next time you use it. Too many may be a bit dazzling.

insert image description here

These configurations will be saved in the ".vuerc" file under the Administrator on the C drive

insert image description here

Just delete the corresponding object.

Summarize

This is the end of this article about vue-cli4.5.x quick project building. For more related vue-cli4.5.x project building content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • In-depth understanding of the directory structure after Vue-cli builds the project
  • Detailed steps for building a project with vue-cli3
  • Analysis of the causes of CSS errors in projects built with Vue-cli
  • Detailed explanation of how to use vue-cli scaffolding to build a Vue.js project
  • Detailed explanation of the process of building a project with vue-cli3.0 scaffolding
  • How to build a Vue project using Vue-cli 3.0
  • Build a bottom navigation bar mobile front-end project based on vue-cli vue-router

<<:  MySQL 5.7.24 installation and configuration graphic tutorial

>>:  Command to remove (delete) symbolic link in Linux

Recommend

Vue implements a search box with a magnifying glass

This article shares with you how to use Vue to im...

How to print highlighted code in nodejs console

Preface When the code runs and an error occurs, w...

How to restore docker container data

The project test environment database data is los...

Implementation of MySQL's MVCC multi-version concurrency control

1 What is MVCC The full name of MVCC is: Multiver...

Serial and parallel operations in JavaScript

Table of contents 1. Introduction 2. es5 method 3...

Detailed tutorial on installing MariaDB on CentOS 8

MariaDB database management system is a branch of...

Vue example code using transition component animation effect

Transition document address defines a background ...

MySQL Practical Experience of Using Insert Statement

Table of contents 1. Several syntaxes of Insert 1...

How to implement Docker Registry to build a private image warehouse

The image of the microservice will be uploaded to...

What to do if you forget your mysql password

Solution to forgetting MySQL password: [root@loca...

Summary of the use of vue Watch and Computed

Table of contents 01. Listener watch (1) Function...

MySQL compressed package version zip installation configuration method

There are some problems with the compressed versi...

An elegant way to handle WeChat applet authorization login

Preface When the WeChat mini program project invo...