VUE-CLI 2.0

1.安装脚手架
$ npm install –global vue-cli

2.创建项目 # 创建一个基于 webpack 模板的新项目
$ vue init webpack my-project #my-project是项目名称可以为自己写的项目命名

3.项目描述
Project description (A Vue.js project)

4.填写作者名称
? Author choi #choi是作者名可以填你自己的

5.VUE生成(使用箭头键) 上下键选择,默认就好了
Vue build (Use arrow keys)

Runtime + Compiler: recommended for most users

Runtime-only: about 6KB lighter min+gzip, but templates (or any Vue-specific HTML) are ONLY allowed in .vue files – re
nder functions are required elsewhere

6.安装路由 vue-router
Install vue-router? y

7.是否启动ES严格模式
? Use ESLint to lint your code? No

8.创建测试文件
? Set up unit tests No

9.项目创建后,是否运行“NPM安装”。回车默认安装
? Setup e2e tests with Nightwatch? (Y/n)
Should we run npm install for you after the project has been created? (recommended) (Use arrow keys)

Yes, use NPM

Yes, use Yarn
No, I will handle that myself

VUE-CLI 3.0

1.创建项目
vue create my-project
#或
vue ui