一、创建项目
vue init webpack 项目文件夹的名字 (vuecli2test)
? Project name (vuecli2test) --项目名称 直接enter默认和项目文件夹的名称相同
? Project description (A Vue.js project) --项目的描述信息 (test vue cli2)
? Author ---作者
? 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 - render functions are required elsewhere
--项目的构建方式 Runtime + Compiler 或者 Runtime-only
? Install vue-router? (Y/n) --是否安装路由
? Use ESLint to lint your code? (Y/n) --是否使用ESLint 检测不规范代码
? Set up unit tests (Y/n) --是否建立单元测试
? Setup e2e tests with Nightwatch? (Y/n) --是否建立e2e测试
? 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 --选择安装方式