1. Create a project

1. Environment

1. Install node.js

2. vue development environment to build, install scaffolding tool vue

npm install --global vue-cli

2. Create vue project

 

1. Create a new project vue-demo1

init-view webpack view demo1

In addition to Use EsLint ...... then select no (code inspection function, if you select the default Enter, less space will make an error), other inquiries directly hit enter.

2. If you rely too slow to download, download the dependencies into cnpm

Ctrl key + C to stop the progress of the current download and install dependencies 
Y + carriage 
mounted Taobao the install image NPM -g CNPM --registry = HTTPS: // registry.npm.taobao.org 
CD vue- demo01 
CNPM the install

3. Run the project:

VUE-demo01 cd # If the above cnpm already in the project directory that you do not need a command 
npm run dev

Browser access:

http://127.0.0.1:8080

See the results shown below, represents the new vue project a success.

 

 4. Create a condensed Directory Project

Small projects can use the stripped-down version, Lite does not have a standardized code of inquiry, run the command directly:

init-view webpack simple sight-demo2

Then have a carriage return, you can create success.

Then install depend on:

cd vue-demo2
cnpm install
npm run dev

 

Guess you like

Origin www.cnblogs.com/xuepangzi/p/11572735.html