Home > Web Front-end > JS Tutorial > How to install vue on Mac

How to install vue on Mac

php中世界最好的语言
Release: 2018-04-28 15:27:34
Original
2317 people have browsed it

This time I will show you how to installvue on Mac, and what are the precautions for installing vue on Mac. The following is a practical case, let’s take a look.

npm -v <br>cnpm -v

These environments have been configured successfully. If not, please click this article to view: node and cnpm installation to see One article is enough

If everything is OK, then let’s get to the point

First open the terminal and enter the following content

sudo cnpm install -g vue -cli

After successful installation, enter vue and the following content will appear:

How to install vue on Mac

Enter vue list to view:


How to install vue on Mac

#OK When these appear, your global vue will be installed successfully.

Install the webpack template and set the project information
Enter the command vue init webpack sell
Note: sell is the name, you can name it whatever you want

Next enter the project name, project description, author, whether to install routing, whether to use the post-ES detector, enter y, yes, whether a front-end test library is required n, no, complete.

How to install vue on Mac

Then enter the command cd sell

Enter the command sudo cnpm install

How to install vue on Mac

Enter the commandsudo cnpm run dev

How to install vue on Mac

The above is the method to install vue. Now the installation and creation are successful~ ~~

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

How to remove duplicate data when merging multiple arrays

What is required for vue configuration to request local json data step

The above is the detailed content of How to install vue on Mac. 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template