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:
- Unified directory structure
- Local Debugging
- Hot deployment
- unit test
- Integrated on-line package
We build the Vue environment needed for the project:
Node.js : http://nodejs.cn/download/
安装就无脑下一步就好,安装在自己的环境目录下
Confirm nodejs successful installation:
- Input node -v cmd down to see if this number can correctly print publication can be!
- 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
We can use the vue ui
command to enter Vue visual interface to create a Vue project
So far we have created the Vue project finished!