1.vue官方文档
1.创建项目
方式一:vite(推荐)
npm init vue@latest
会有如下提示
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 //运行项目
方式二:vue-cli
vue create 项目名
标签:实战,npm,vue,No,Add,添加,vue3,Yes From: https://www.cnblogs.com/zph666/p/16942656.html