A review of the creation of vue scaffolding

1. First of all, I want to use the scaffolding provided by vue to write front-end projects.

Baidu, go to the official website to download

 

 After the download is complete, keep clicking Next. After the installation is complete, run node -v and npm -v. If the version number is displayed successfully, the installation is successful.

 

For the first time learning vue, you can first create a small project for code learning

Steps: npm inti-> npm install vue --save       // --save means vue is downloaded to the current project

 

 

 

 

 

 At this point, the vue small project has been downloaded

 

2. Download webpack tool (static module packer, support modular es6 module)

The function of webpack is simply to package all the modules in the front end, output a JS file, and then introduce this JS file. Project management

npm i [email protected] -g      // -g means --global download global

 

If the version number is displayed, the installation was successful

 

3. vue-cli scaffolding (the author helps you configure most of the development environment, you can directly develop without building an environment)

Download vue_cli:  https://cli.vuejs.org/zh/

 

 After downloading, also, use vue -V to check whether the installation is successful

 

 If you want to use the old version (version 2), you need to download it again

 

 

3.1 Create a vue-cli project

vue init <template> <project name>

Template: 3.1.1 webpack-simple simply configure the webpack template.

            3.1.2 Webpack official version

  

 

 After a long wait, as long as Project initialization finished! Is displayed, it means success

 

 

 3.2 Startup project Execute To get started: the following two lines of commands.

 

 

 

Open http: // localhost: 8080 in the browser

 

 

Guess you like

Origin www.cnblogs.com/chale181106/p/12702365.html