Detailed steps for creating a Vue scaffolding project

Detailed steps for creating a Vue scaffolding project

vue scaffolding -> vue.cli

Quickly create a large, fully functional vue project template (initializer project)

Earthy explanation: quickly create an empty vue project

Installation (global installation)

  • Global installation
> npm i @vue/cli -g
  • Create a Vue scaffolding project
> vue create project name

Configuration options

Vue CLI v4.5.11
? Please pick a preset: (Use arrow keys)
> Default ([Vue 2] babel, eslint) 
 Default (Vue 3 Preview) ([Vue 3] babel, eslint) 
 Manually select features
  • Press up and down to select, press Enter to confirm, here select the third option manual

Select Features

Vue CLI v4.5.11
? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection)
>(*) Choose Vue version
 (*) Babel
 ( ) TypeScript
 ( ) Progressive Web App (PWA) Support
 ( ) Router
 ( ) Vuex
 ( ) CSS Pre-processors
 (*) Linter / Formatter
 ( ) Unit Testing
 ( ) E2E Testing
  • Move the cursor up and down, press space to select, press Enter to confirm, here select option 1 2 5 6

Select version

? Check the features needed for your project: Choose Vue version, Babel, Router, Vuex
Choose a version of Vue.js that you want to start the project with (Use arrow keys)
> 2.x
 3.x (Preview)
  • Select 2.x here

Whether to use history mode

? Use history mode for router? (Requires proper server setup for index fallback in production) (Y/n)
  • Enter n here and press Enter

Configuration location of Babel, ESLint, etc.

Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys)
> In dedicated config files
 In package.json
  • Here, select the first dedicated configuration file to store

Save as preset

? Save this as a preset for future projects? (y/N)
  • Here we select n

Create Success

Vue CLI v4.5.11
Creating project in D:\MyStudy\myvue2.
⚙️ Installing CLI plugins. This might take a while...


> [email protected] postinstall D:\MyStudy\myvue2\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> [email protected] postinstall D:\MyStudy\myvue2\node_modules\ejs
> node ./postinstall.js

added 1208 packages from 928 contributors in 21.836s

61 packages are looking for funding
run `npm fund` for details

🚀 Invoking generators...
📦 Installing additional dependencies...

added 5 packages from 1 contributor in 4.671s

61 packages are looking for funding
run `npm fund` for details    

⚓ Running completion hooks...

📄 Generating README.md...

🎉 Successfully created project myvue2.  
👉 Get started with the following commands:

$ cd myvue2
$ npm run serve

Enter the project directory

> cd myvue2

Start the service

> npm run serve
 DONE Compiled successfully in 2492ms                   

 App running at:
 - Local: http://localhost:8080/ 
 - Network: http://192.168.17.154:8080/

 Note that the development build is not optimized.
 To create a production build, run npm run build.

This concludes this article about the detailed steps of creating a vue scaffolding project. For more relevant vue scaffolding project creation content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Several ways to introduce pop-up layer plug-ins into vue-cli scaffolding
  • Causes and solutions for errors in vue-cli scaffolding static resource requests
  • Specific use of VUE scaffolding
  • How to build your own scaffolding by imitating vue-cli

<<:  Detailed tutorial on how to install mysql8.0 using Linux yum command

>>:  Summary of using the exclamation mark command (!) in Linux

Recommend

Detailed explanation of software configuration using docker-compose in linux

Preface This article will share some docker-compo...

Linux system calls for operating files

Table of contents 1. Open the file Parameter Intr...

Using vsftp to build an FTP server under Linux (with parameter description)

introduce This chapter mainly introduces the proc...

MySQL GTID comprehensive summary

Table of contents 01 Introduction to GTID 02 How ...

Web Design Experience

<br />The author used to be a novice in web ...

Use of Linux stat command

1. Command Introduction The stat command is used ...

Troubleshooting ideas and solutions for high CPU usage in Linux systems

Preface As Linux operation and maintenance engine...

Introduction to useRef and useState in JavaScript

Table of contents 1. useState hook 2. useRef hook...

MySQL sorting principles and case analysis

Preface Sorting is a basic function in databases,...

Secondary encapsulation of element el-table table (with table height adaptation)

Preface During my internship at the company, I us...

How to use resident nodes for layer management in CocosCreator

CocosCreator version: 2.3.4 Most games have layer...