Explanation of vue Scaffold Project Creation Steps

  • 2021-11-01 01:46:37
  • OfStack

vue scaffolding-- > vue.cli

Quickly create a large full-featured vue project template (initialize the project)

Earthy explanation: Quickly create an empty vue project

Installation (Global Installation)

Global installation

> npm i @vue/cli -g 
Create an 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, enter to confirm, select item 3 manually here

Selection function


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, select the space, enter to confirm, select the 1 2 5 6 option here

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 Enter here

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 special configuration file to store

Whether to save as preset


? Save this as a preset for future projects? (y/N)
Select n here

Successful creation


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


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


> ejs@2.7.4 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

Startup service


> vue create  Project name 
0

> vue create  Project name 
1

Related articles: