The first project to build a Vue

We write Vue Vue project will be used to use scaffolding vue-cli

vue-cli official of a scaffolding, used to quickly generate a vue of project templates;
pre-defined directory structure and the underlying code, like when we create Maven project can choose to create a skeleton project, this project is the scaffolding skeleton, our development is more rapid;

Its main features are:

  1. Unified directory structure
  2. Local Debugging
  3. Hot deployment
  4. unit test
  5. Integrated on-line package

We build the Vue environment needed for the project:

Node.js : http://nodejs.cn/download/
安装就无脑下一步就好,安装在自己的环境目录下

Confirm nodejs successful installation:

  1. Input node -v cmd down to see if this number can correctly print publication can be!
  2. Enter npm-v cmd down to see if this number can correctly print publication can be!

This npm, is a package management tool, apt and software under linux install almost!

Taobao mirror installed Node.js accelerator (cnpm)

This way, then, download much faster -

# -g 就是全局安装
npm install cnpm -g

# 或使用如下语句解决 npm 速度慢的问题
npm install --registry=https://registry.npm.taobao.org

#查看cnpm的版本
cnpm -v

Installation vue-cli

cnpm install vue-cli -g

# 测试是否安装成功
# 查看可以基于哪些模板创建 vue 应用程序,通常我们选择 webpack
vue list

Here Insert Picture Description
We can use the vue uicommand to enter Vue visual interface to create a Vue project

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

So far we have created the Vue project finished!

Published 53 original articles · won praise 0 · Views 1942

Guess you like

Origin blog.csdn.net/XXuan_/article/details/104888355