Vue-Cli 细节及问题
使用脚手架创建项目
1.创建项目
vue init webpack 项目名称
2.project name
Project name(VueLession04) vuelession04
3.项目描述
Project description(A. Vue.js project) vuelession04
4.作者,回车
Author(wkj <1547788799@qq.com>)
5.runtime和runtime-only(后面仔细说,前面有概述)
> 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 - render functions are required elsewhere
6.路由配置
Install vue-router(Y/n)
7.编码规范设置(建议n,编码太严格不利于开发)
Use ESlint to lint your code(Y/n)
如果设置Y,编码中一有不规范保存就不会通过编译,比如多一个空格也不行,所以我们一般情况下是no
8.单元测试,一般no
Set up unit tests(Y/n)
9.端对端测试
Setup e2e tests with Nightwatch? (Y/n) n
10.选npm
? 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
11.回车安装成功.