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

CentOS 6.5 i386 installation MySQL 5.7.18 detailed tutorial

Most people compile MySQL and put it in the syste...

Solution to Vue's inability to watch array changes

Table of contents 1. Vue listener array 2. Situat...

Native JS to implement the aircraft war game

This article example shares the specific code of ...

The solution record of Vue failing to obtain the element for the first time

Preface The solution to the problem of not being ...

Database index knowledge points summary

Table of contents First Look Index The concept of...

How to manually upgrade the node version under CentOs

1. Find the corresponding nodejs package, refer t...

Detailed explanation of the general steps for SQL statement optimization

Preface This article mainly shares with you the g...

Detailed process of decompressing and installing mysql5.7.17 zip

1. Download address https://dev.mysql.com/downloa...

About if contains comma expression in JavaScript

Sometimes you will see English commas ",&quo...

What I learned while building my own blog

<br />In one year of blogging, I have person...

Tutorial on Migrating Projects from MYSQL to MARIADB

Prepare the database (MySQL). If you already have...

VMware 15.5 version installation Windows_Server_2008_R2 system tutorial diagram

1. Create a new virtual machine from VMware 15.5 ...

JavaScript implements the pot-beating game of Gray Wolf

1. Project Documents 2. Use HTML and CSS for page...

Detailed steps to install Sogou input method on Ubuntu 20.04

1. Install Fcitx input framework Related dependen...

Detailed explanation of Linux environment variable configuration strategy

When customizing the installation of software, yo...