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

How to install vue on Mac

php中世界最好的语言
php中世界最好的语言Original
2018-05-25 14:02:581737browse

This time I will show you how to installvue in Mac. What are the precautions for installing vue in 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

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

Recommended reading:

How to develop a custom library

jquery dynamically adds click event step-by-step explanation

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!

Statement:
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