The most detailed vue.js installation tutorial

小云云
Release: 2017-12-19 16:22:05
Original
3460 people have browsed it

This article mainly shares a vue.js installation tutorial worth collecting for everyone. It has certain reference value. Interested friends can refer to it. I hope it can help everyone.

This article shares the vuejs installation tutorial for your reference. The specific content is as follows:

1. Install nodejs and bring your own npm environment.

Address: https://nodejs.org/en/download/, Node.js historical version download address: https://nodejs.org/dist/ You can choose the version that suits your operating system.

For the installation process, please refer to: Installation Configuration

2. Install the Taobao image.

Because the speed of domestic access to foreign links is too slow, it is recommended to set the npm registry source to a domestic mirror, which can greatly improve the installation speed.

Open cmd and enter directly:npm install -g cnpm –registry=https://registry.npm.taobao.org, press Enter, wait for installation...


npm install -g cnpm --registry=https://registry.npm.taobao.org
Copy after login

Note=There must be no spaces after, otherwise an error will be reported.

3. Install express (select to install).


cnpm install -g express
Copy after login

4. Install webpack.


cnpm install -g webpack
Copy after login

5. Install vue.


cnpm install vue
Copy after login

6. Install vue-cli.


cnpm install -g vue-cli
Copy after login

7. At this point, the environment setup has been completed and project initialization can begin.

Use the cd command in cmd to jump to the specified address, project initialization command: vueinitwebpackvue-projectname. projectname--The name of the project folder (the name cannot be in Chinese). This vue-projectname folder will be automatically generated in the working directory you jump to.


vue init webpack vue-projectname
Copy after login

Note: During the installation process, you need to enter the project name, description, author, etc., which is the one in the picture above? The answer behind.

8.cd to our project folder d:\Vue\vue-test and run the command cnpm install to install the package.


cnmp install
Copy after login

9. Test whether the project is installed successfully.


cnpm run dev
Copy after login

Have you all learned it? Hurry up and give it a try.

Related recommendations:

A summary of practical vue.js project tips

Vue.js develops a globally called MessageBox component

What are the commonly used instructions in Vue.js

The above is the detailed content of The most detailed vue.js installation tutorial. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!