vue3创建项目命令:
npm init vue@3
vue2创建项目命令:
npm init vue@2
✔ Project name: … vue-project ----> //项目名称
✔ Add TypeScript? … No / Yes----> //是否添加TS
✔ Add JSX Support? … No / Yes -----> //是否JSX
✔ Add Vue Router for Single Page Application development? … No / Yes ---> //是否添加路由
✔ Add Pinia for state management? … No / Yes ---> //是否添加pinia状态管理工具,相当相于vue2的vuex
✔ Add Vitest for Unit Testing? … No / Yes --->//是否安装单元测试
✔ Add Cypress for both Unit and End-to-End testing? … No / Yes ----> //是否安装端到端测试
✔ Add ESLint for code quality? … No / Yes ---> //是否安装ESlint代码检查工具
✔ Add Prettier for code formatting? … No / Yes -----> //是否安装Prettier格式工具
cd vue-project ----->进入项目
npm install ---->下载依赖
npm run lint ------>启动文件
npm run dev ----->启动文件