VUE project learning (1): build a VUE front-end project

VUE project learning (1): build a VUE front-end project

1. Install the node.js environment

(1) Download node.js, the download address is: https://nodejs.org/en/
(2) Install node according to the default options, check the installation version
Insert picture description here
(3) Configure the download mirror, the mirror address is: http://npm .taobao.org/ , after the installation is successful, you can directly use cnpm instead of npm command

npm install -g cnpm –registry=https://registry.npm.taobao.org

Check if cnpm is installed successfully
Insert picture description here

2. Build a vue project

(1) Install VUE scaffolding vue-cli globally, execute the command:

npm install --global vue-cli

The interface for successful installation is:
Insert picture description here
(2) Select the project directory and create a new VUE project based on the webpack template. The project download command is:

vue init webpack demo

In the project configuration interface, you can refer to the following figure description: After the
Insert picture description here
project is successfully downloaded, the following figure is shown:
Insert picture description here
(3) Start the project, enter the root directory where the project is located, and run the project start command:

npm run dev

After the project is started successfully, the interface is as follows:
Insert picture description here
Enter: http://localhost:8080 in the address bar of the browser, and the following interface appears, indicating that the initial project is successfully built, and personalized front-end development is ready!
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_26666947/article/details/111929871