On mac vue development environment to build

Vue development environment built on mac:

The Internet to find a lot of information, order, and the success rate is not very suitable for mac local environment to build, set up is completed here by their own success, hereby listed under the tutorials, 一回生二回熟, created more than a few times, you will naturally practice makes perfect;

Specific reference is made to better the cnBlogs "growing calf," the blog steps, would like to thank: https://www.cnblogs.com/pengjunhao/p/6798496.html

1, first go to node.js nodejs official website to download the installation package;

https://nodejs.org/en/download/

Click Next, select the installation;

2. The second step:

nodejs package, comprising npm install command, a second step, to modify Taobao mirror:

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

3, the third step:

Scaffolding installation vue, vue-cli

sudo cnpm install -g vue-cli

4. Step Four:

Mac OS system installed brew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

5. Step five:

Nodejs get access to the module installation directory:

sudo chmod -R 777 /usr/local/lib/node_modules/

6. Step Six:

Installation webpack

cnpm install webpack -g

7 Step 7:

Vue create a project:

There are two ways to create a command created by:

vue init webpack (which template? do not know can Baidu) Project name <project name can not use Chinese>

The second is through the ide editor to create, because I am lazy, use a webstorm editor, webstorm is a god-level editor;

Download: https://www.jetbrains.com/webstorm/?fromMenu

Here Tim strong wave of webstorm, indeed very useful for Android development for me, very easy to use; however, you can choose to force the grid and made sublime self;

Created, specific directories shots are as follows:

 

8, the last step, open the terminal end, navigate to the project directory created:

Excuting an order:

cnpm install

 

Installation vue routing module vue-router and network requests vue-resource module

CNPM install view-router-resource view --save

 

Startup project:

vue altitude rundev

 

In the browser, enter: HTTP: // localhost: 8080 will be able to see the results vue newly created project;

 

Guess you like

Origin blog.csdn.net/u011498329/article/details/85012426