(@_@;)我是程序猿,我编程,我快乐,知识改变命运,技术成就梦想   oh yeah!合作VX "w6668263" 联系Email:ye583025823@126.com

快速上手 创建一个 Vue 应用

https://cn.vuejs.org/guide/quick-start.html

在本节中,我们将介绍如何在本地搭建 Vue 单页应用。创建的项目将使用基于 Vite 的构建设置,并允许我们使用 Vue 的单文件组件 (SFC)。

确保你安装了最新版本的 Node.js,并且你的当前工作目录正是打算创建项目的目录。

 npm create vue@latest
 
 pnpm create vue@latest
 
 yarn create vue@latest
 
 bun create vue@latest

这一指令将会安装并执行 create-vue,它是 Vue 官方的项目脚手架工具。你将会看到一些诸如 TypeScript 和测试支持之类的可选功能提示:

✔ Project name: … <your-project-name>
✔ Add TypeScript? … No / Yes
✔ Add JSX Support? … No / Yes
✔ Add Vue Router for Single Page Application development? … No / Yes
✔ Add Pinia for state management? … No / Yes
✔ Add Vitest for Unit testing? … No / Yes
✔ Add an End-to-End Testing Solution? … No / Cypress / Nightwatch / Playwright
✔ Add ESLint for code quality? … No / Yes
✔ Add Prettier for code formatting? … No / Yes
✔ Add Vue DevTools 7 extension for debugging? (experimental) … No / Yes

Scaffolding project in ./<your-project-name>...
Done.

如果不确定是否要开启某个功能,你可以直接按下回车键选择 No。在项目被创建后,通过以下步骤安装依赖并启动开发服务器:

cd <your-project-name>
npm install
npm run dev



cd <your-project-name>
pnpm install
pnpm run dev


cd <your-project-name>
yarn
yarn dev

cd <your-project-name>
bun install
bun run dev

 

posted on 2024-06-25 20:48  一个草率的龙果果  阅读(4)  评论(0编辑  收藏  举报

导航