vue 3.0 + typeScript
1. 创建项目
vue create my-project
Manually select features 手动配置
Choose Vue version 选择版本
Babel 将es6编译成es5
TypeScript JS超集,主要是类型检查
Router和Vuex 理由和状态管理
Linter/ Formatter 代码检查工具
CSS Pre-processors css预编辑
Unit Testing 单元测试,开发工程中前端对代码进行自运行测试
选择vue版本 3.x
是否使用class风格装饰器?
即原本创建vue实例 home = new Vue()
使用装饰器后: class home extends Vue{}
使用Babel与TypeScript 一起用于自动检测的填充
路由使用历史模式
代码检查工具
- ESLint with error prevention only 只进行报错提醒
- ESLint + A 不严谨模式
- ESLint + S 正常模式
- ESLint + P 严格模式
代码检查方式: 保存时检查
将所有依赖目录放在package.json文件里
是否在以后的项目中使用以上配置
2. 启动项目
cd my-project
yarn serve