vue - Create a new project

vue scaffolding official website address:   https://cli.vuejs.org/zh/

vue official website address:  https://cn.vuejs.org/

Reference blog: https://www.cnblogs.com/wangcuican/p/11650118.html

https://www.cnblogs.com/linjiu0505/p/11549372.html

1, check the installation environment

(1) Elevation

Version: npm> 3

Detection command: npm -v

Upgrade npm: npm install npm - G

(2)node

Version: node> = 8

Test Command: node -v

You can use nvm or nvm-windows to manage multiple versions of the Node on the same computer.

(3)webpack

Detection command: webpack -v

Installation command:

1) npm install -g webpack webpack-cli // global WebPACK installation and webpack-cli (webpack scaffold)

2) npm install webpack webpack-cli --save-dev // project installation webpack and webpack-cli (webpack scaffolding)

Check the version:

  1) webpack -v // Use this command to install the global

2) Use this command when npx webpack -v // project installation

webpack-cli role:

It allows us to use the command line webpack normal command, if you do not install, then we would not be able to run from the command line or npx webpack command webpack

2, set up the project environment

(1) npm install vue vue // install   the latest stable version

(2) npm install - , Ltd. Free Join vue - cli     // install scaffolding vue

(3) VUE the init webpack My - Project        //   create a new project template based webpack

my-project, project name, self-defined;

It should be some configuration, press Enter to default

(4) cd my-project // into the project

(5) npm install // mounted reliance

(5) npm run dev // run

 Tour Input Address  HTTP : // localhost: 8080 can be friends

 

Guess you like

Origin www.cnblogs.com/AmberNi/p/11667038.html