Vue cli2项目初始化
其他
2020-03-12 14:17:37
阅读次数: 0
Vue CLI2详解
vue init webpack my-project
- 初始化命令,据你用的文件名创建一个文件夹,存放之后项目的内容
- 该名称也会作为默认的项目名称,但是不能包含大写字母等
? Project name (my-project)
- 项目名称不能包含大写
- 默认(回车)将上一个文件名作为项目名称
? Project description (A Vue.js project)
? Author (xiaoqiang <[email protected]>)
> Runtime + Compiler: recommended for most users
- 如果在之后的开发中,你依然使用template,就需要选择Runtime-Compiler
- 如果你之后的开发中,使用的是.vue文件夹开发,那么可以选择Runtime-only
? Install vue-router? (Y/n)
? Use ESLint to lint your code? (Y/n)
? Set up unit tests (Y/n)
? Setup e2e tests with Nightwatch? (Y/n)
- e2e测试(end to end)
- 安装Nightwatch,是一个利用selenium或webdriver或phantomjs等进行自动化检测的框架
? 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
- build文件夹及config文件夹
- node_modules文件夹
- src文件夹
- .babelrc文件
- .editorconfig文件
- .gitignore文件
- .postcssrc.js文件
转载自www.cnblogs.com/landuo629/p/12468893.html