vue-cli2.X environment to build

1. Install nodejs environment
https://npm.taobao.org/mirrors/node  (alternate version)
Next Next default installation on the line

2. Check whether the node and npm successfully installed
node -v npm -v (version)

 


3. Install cnpm

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

  Ing installation

  finish installation

 

4. vue mounting frame;
CNPM the install -g-CLI vue

 


5. Installation WebPACK strapping tool;
CNPM the install WebPACK -g

 


6. build a project folder and cd to it

 


7.webpack packaged vue assembly to the project folder;
vue the init WebPACK mydemo
Special Note: There should choose to create their own mistakes will not be reported following the third reason should be the first option is to create a domestic npm npm too slow on the error
Choose their own creation and then created enough with cnpm install

 


8.cd to the project folder with package.json this directory hierarchy
cnpm install 
Then npm run dev server project started the browser http: // localhost: 8080 to access

Guess you like

Origin www.cnblogs.com/v616/p/11260296.html