Nuxtjs 学习笔记 — 01 安装
1、使用 yarn creat next-app 构建项目
复制代码
1
2
3遇到报错 syntax error near unexpected token `newline' 将 <project-name> 改为 project-name 即可。'<'和'>'是特殊字符,命令端输入命令时应该把'<>'去掉
2、选择配置项
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65// 项目名称 Project name: // 选择编程语言 Programming language: >JavaScript TypeScript // 包管理工具 Package manager: >Yarn Npm // UI 库 UI framework: >None Ant Design Vue Bootstrap Vue Buefy Bulma Chakra UI Element Framevuerk iView Tachyons Tailwind CSS Vuesax Vuetify.js // http 请求 Nuxt.js modules: >◯ Axios ◯ Progressive Web App (PWA) ◯ Content // ESLint 配置 Linting tools: >◯ ESLint ◯ Prettier ◯ Lint staged files ◯ StyleLint ◯ Commitlint // 测试框架 Testing framework: ❯None Jest AVA WebdriverIO // 渲染模式 Rendering mode: ❯Universal (SSR / SSG) Single Page App // 服务端渲染 Deployment target: ❯ Server (Node.js hosting) Static (Static/JAMStack hosting) // 开发工具 Development tools: ❯◯ jsconfig.json (Recommended for VS Code if you're not using typescript) ◯ Semantic Pull Requests ◯ Dependabot (For auto-updating dependencies, GitHub only) // 自动化部署 Continuous integration: ❯None GitHub Actions (GitHub only) // 版本管理工具 Version control system: ❯ Git None
3、下载依赖
复制代码
1
2
3
4cd 项目名 yarn || npm install || cnpm install // 三选一
4、启动
复制代码
1
2yarn dev || npm run dev || cnpm run dev // 三选一
应用一般运行在 http://localhost:3000
复制代码
1
2
3
4
5
6
7
8
9
10// 可以在 package.json 配置 ip 与 端口 "config": { "nuxt":{ "host":"", // ip "port":"" // 端口 } }
最后
以上就是无心冥王星最近收集整理的关于Nuxtjs 学习笔记 --- 01 安装Nuxtjs 学习笔记 — 01 安装的全部内容,更多相关Nuxtjs内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复