- 安装vue cli
npm install @vue/cli-init -g - 初始化vue cli工程
vue init webpack vuecli2test - 命名
? Project name vuecli2test - 项目描述
? Project description test vue cli2 - 作者
? Author - 使用哪一个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 - render functions are required elsewhere
- 安装vue路由
? Install vue-router? (Y/n) - 对js代码的限制`? Use ESLint to lint your code? (Y/n)
- 选择规范
? Pick an ESLint preset (Use arrow keys)
> Standard (https://github.com/standard/standard)
Airbnb (https://github.com/airbnb/javascript)
none (configure it yourself)
- 单元测试`? Set up unit tests (Y/n)
- 端到端测试
? Setup e2e tests with Nightwatch? (Y/n) - 使用npm还是yarn
? 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
`
|