安装命令:
npm init vue@3
步骤:
Need to install the following packages:
create-vue@3
Ok to proceed? (y) y----------选Y
Vue.js - The Progressive JavaScript Framework
✔ Project name: … vue3_ok //项目名称
✔ Add TypeScript? … No / Yes //是否使用TS
✔ Add JSX Support? … No / Yes //是否支持JSX,除非你是搞React开发
✔ Add Vue Router for Single Page Application development? … No / Yes //是否添加路由
✔ Add Pinia for state management? … No / Yes //是否添加状态管理 推荐pinia
✔ 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 //是否添加Perttier进行代码格式化
cd vue3_ok //cd 进行目录
npm install //安装相关依赖 npm i
npm run lint //运行代码修复
npm run dev //运行项目