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

How to get the real path of the current script in Linux

1. Get the real path of the current script: #!/bi...

Token verification login in Vue project (front-end part)

This article example shares the specific code of ...

Docker Machine in-depth explanation

Differences between Docker and Docker Machine Doc...

vue-cropper component realizes image cutting and uploading

This article shares the specific code of the vue-...

Detailed steps for installing MySQL using cluster rpm

Install MySQL database a) Download the MySQL sour...

Hbase installation and configuration tutorial under Linux

Table of contents Hbase installation and configur...

How to write DROP TABLE in different databases

How to write DROP TABLE in different databases 1....

Detailed explanation of Js class construction and inheritance cases

The definition and inheritance of classes in JS a...

HTTP and HTTP Collaboration Web Server Access Flow Diagram

A web server can build multiple web sites with in...

A brief discussion on Axios's solution to remove duplicate requests

Table of contents 1. Cancel duplicate requests 2....

Architecture and component description of docker private library Harbor

This article will explain the composition of the ...

CSS style writing order and naming conventions and precautions

The significance of writing order Reduce browser ...

Solution to MySQL root password error number 1045

Stop MySQL Service Windows can right-click My Com...

TypeScript uses vscode to monitor the code compilation process

Install Install ts command globally npm install -...