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:
Enter vue list to view:
#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.
Then enter the command cd sell
Enter the command sudo cnpm install
Enter the commandsudo cnpm run dev
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!