- 下载
npx create-nuxt-app <项目名>
- 选项
Project name: (demo2)//项目名
Programming language: (Use arrow keys)//语言
> JavaScript
TypeScript
Package manager: (Use arrow keys)//包管理器
> Yarn
Npm
UI framework: (Use arrow keys)//UI框架
> None
Ant Design Vue
BalmUI
Bootstrap Vue
Buefy
Chakra UI
Element
Oruga
Primevue
Tachyons
Tailwind CSS
Windi CSS
Vant
View UI
Vuetify.js
Nuxt.js modules: (Press <space> to select, <a> to toggle all, <i> to invert selection)//Nuxt模块
>( ) Axios - Promise based HTTP client
( ) Progressive Web App (PWA)
( ) Content - Git-based headless CMS
Linting tools: (Press <space> to select, <a> to toggle all, <i> to invert selection)//代码校验工具
>( ) ESLint
( ) Prettier
( ) Lint staged files
( ) StyleLint
( ) Commitlint
Testing framework: (Use arrow keys)//测试框架
> None
Jest
AVA
WebdriverIO
Nightwatch
Rendering mode: (Use arrow keys)//渲染模式
> Universal (SSR / SSG)
Single Page App
Deployment target: (Use arrow keys)//部署目标
> Server (Node.js hosting)
Static (Static/Jamstack hosting)
Development tools: (Press <space> to select, <a> to toggle all, <i> to invert selection)//开发工具
>( ) jsconfig.json (Recommended for VS Code if you're not using typescript)
( ) Semantic Pull Requests
( ) Dependabot (For auto-updating dependencies, GitHub only)
What is your GitHub username? (苏舒)//username
Version control system: (Use arrow keys)//版本控制工具
> Git
None
- 项目目录
pages 存放页面 相等于views
components 存放组件
static 静态资源
store vuex
nuxt.config.js 全局配置文件 类似 vue.config.js
plugins UI框架存放目录
- 启动项目
cd 项目名
npm run dev
//参与匿名项目改进
i NuxtJS collects completely anonymous data about usage. 14:02:23
This will help us improve Nuxt developer experience over time.
Read more on https://git.io/nuxt-telemetry
? Are you interested in participating? No
- Nuxt不需要配置vue touter 不用引入组件会自动查找组件
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用