vue- installation and create a new project

1. First we need to install node.js, download address is: https://nodejs.org/en/

After mounting step is normally node.js;

Then open the window + R type cmd enter into the command line module

2. Make sure node.js is installed, enter: node -v (version number have returned, then if you have installed the carriage return, if there is no return, he expressed the need for you to install node.js)

3. Then enter: npm -v

4. Next install webpack, enter: npm install -g webpack

The input image is then used Taobao: npm install -g cnpm --registry = https: //registry.npm.taobao.org

6. Then the installation tool vue scaffolding, enter: npm install -g vue-cli

7. After the project began to create the installation is complete: Create a project myvue01

   Enter the command: vue init webpack myvue01

   At this point you will continue to enter something, notice Eslint that option is selected N (Eslint grammatical rules and code style checking tool will automatically detect whether the current project code conforms to a predetermined rule, if you write code the rules do not meet the preset will complain), and has a carriage return.

8. After you've created the project, go to the project, and then execute the command to run the project enter: npm run dev   

 

Second example: if I f disk vue created a project called my-vuedemo01, and how do I open the pages? The following processes are:

cmd to open a command

display:

Then enters tray f:

Then find the folder name:

Then perform the operation:

Finally open "localhost.8080" in the browser:

 

Guess you like

Origin www.cnblogs.com/liuqingxia/p/11286089.html