@@ -6,33 +6,34 @@ import { TabBar } from '@/components/Guides/TabBar.jsx'
6
6
7
7
let tabs = [
8
8
{
9
- name : 'Nuxt 2 ' ,
10
- href : '#2 ' ,
9
+ name : 'Nuxt 3 ' ,
10
+ href : '#3 ' ,
11
11
steps : [
12
12
{
13
13
title : 'Create your project' ,
14
14
body : ( ) => (
15
15
< p >
16
16
Start by creating a new Nuxt project if you don’t have one set up already. The most
17
- common approach is to use{ ' ' }
18
- < a href = "https://nuxtjs.org/guides/get-started/installation" > Create Nuxt App</ a > .
17
+ common approach is to use the{ ' ' }
18
+ < a href = "https://nuxt.com/docs/getting-started/installation" >
19
+ Nuxt Command Line Interface
20
+ </ a >
21
+ .
19
22
</ p >
20
23
) ,
21
24
code : {
22
25
name : 'Terminal' ,
23
26
lang : 'terminal' ,
24
- code : 'npx create-nuxt-app my-project\ncd my-project' ,
27
+ code : 'npx nuxi init my-project\ncd my-project' ,
25
28
} ,
26
29
} ,
27
30
{
28
31
title : 'Install Tailwind CSS' ,
29
32
body : ( ) => (
30
- < >
31
- < p >
32
- Install < code > tailwindcss</ code > and its peer dependencies via npm, and then run the
33
- init command to generate a < code > tailwind.config.js</ code > file.
34
- </ p >
35
- </ >
33
+ < p >
34
+ Install < code > tailwindcss</ code > and its peer dependencies via npm, and then run the
35
+ init command to generate a < code > tailwind.config.js</ code > file.
36
+ </ p >
36
37
) ,
37
38
code : {
38
39
name : 'Terminal' ,
@@ -45,24 +46,21 @@ let tabs = [
45
46
body : ( ) => (
46
47
< p >
47
48
Add < code > tailwindcss</ code > and < code > autoprefixer</ code > to the{ ' ' }
48
- < code > build. postcss.plugins</ code > object in your < code > nuxt.config.js</ code > file.
49
+ < code > postcss.plugins</ code > object in your < code > nuxt.config.js</ code > file.
49
50
</ p >
50
51
) ,
51
52
code : {
52
53
name : 'nuxt.config.js' ,
53
54
lang : 'js' ,
54
- code : ` export default {
55
- build: {
56
- > postcss: {
57
- > postcssOptions: {
58
- > plugins: {
59
- > tailwindcss: {},
60
- > autoprefixer: {},
61
- > },
62
- > },
55
+ code : ` // https://nuxt.com/docs/api/configuration/nuxt-config
56
+ export default defineNuxtConfig({
57
+ > postcss: {
58
+ > plugins: {
59
+ > tailwindcss: {},
60
+ > autoprefixer: {},
63
61
> },
64
- }
65
- }` ,
62
+ > },
63
+ }) ` ,
66
64
} ,
67
65
} ,
68
66
{
@@ -84,6 +82,7 @@ let tabs = [
84
82
> "./pages/**/*.vue",
85
83
> "./plugins/**/*.{js,ts}",
86
84
> "./nuxt.config.{js,ts}",
85
+ > "./app.vue",
87
86
> ],
88
87
theme: {
89
88
extend: {},
@@ -107,21 +106,26 @@ let tabs = [
107
106
} ,
108
107
} ,
109
108
{
110
- title : 'Import the CSS file' ,
109
+ title : 'Add the CSS file globally ' ,
111
110
body : ( ) => (
112
111
< p >
113
- Add the newly-created < code > ./assets/css/main.css</ code > file to the < code > css</ code > { ' ' }
114
- array in the < code > nuxt.config.js</ code > file.
112
+ Add your newly-created < code > ./assets/css/main.css</ code > to the < code > css</ code > array
113
+ in your < code > nuxt.config.js</ code > file.
115
114
</ p >
116
115
) ,
117
116
code : {
118
117
name : 'nuxt.config.js' ,
119
118
lang : 'js' ,
120
- code : ` export default {
121
- css: [
122
- > '@/assets/css/main.css',
123
- ],
124
- }` ,
119
+ code : ` // https://nuxt.com/docs/api/configuration/nuxt-config
120
+ export default defineNuxtConfig({
121
+ > css: ['~/assets/css/main.css'],
122
+ postcss: {
123
+ plugins: {
124
+ tailwindcss: {},
125
+ autoprefixer: {},
126
+ },
127
+ },
128
+ })` ,
125
129
} ,
126
130
} ,
127
131
{
@@ -141,7 +145,7 @@ let tabs = [
141
145
title : 'Start using Tailwind in your project' ,
142
146
body : ( ) => < p > Start using Tailwind’s utility classes to style your content.</ p > ,
143
147
code : {
144
- name : 'App .vue' ,
148
+ name : 'app .vue' ,
145
149
lang : 'html' ,
146
150
code : ` <template>
147
151
> <h1 class="text-3xl font-bold underline">
@@ -153,34 +157,33 @@ let tabs = [
153
157
] ,
154
158
} ,
155
159
{
156
- name : 'Nuxt 3 ' ,
157
- href : '#3 ' ,
160
+ name : 'Nuxt 2 ' ,
161
+ href : '#2 ' ,
158
162
steps : [
159
163
{
160
164
title : 'Create your project' ,
161
165
body : ( ) => (
162
166
< p >
163
167
Start by creating a new Nuxt project if you don’t have one set up already. The most
164
- common approach is to use the{ ' ' }
165
- < a href = "https://nuxt.com/docs/getting-started/installation" >
166
- Nuxt Command Line Interface
167
- </ a >
168
- .
168
+ common approach is to use{ ' ' }
169
+ < a href = "https://nuxtjs.org/guides/get-started/installation" > Create Nuxt App</ a > .
169
170
</ p >
170
171
) ,
171
172
code : {
172
173
name : 'Terminal' ,
173
174
lang : 'terminal' ,
174
- code : 'npx nuxi init my-project\ncd my-project' ,
175
+ code : 'npx create-nuxt-app my-project\ncd my-project' ,
175
176
} ,
176
177
} ,
177
178
{
178
179
title : 'Install Tailwind CSS' ,
179
180
body : ( ) => (
180
- < p >
181
- Install < code > tailwindcss</ code > and its peer dependencies via npm, and then run the
182
- init command to generate a < code > tailwind.config.js</ code > file.
183
- </ p >
181
+ < >
182
+ < p >
183
+ Install < code > tailwindcss</ code > and its peer dependencies via npm, and then run the
184
+ init command to generate a < code > tailwind.config.js</ code > file.
185
+ </ p >
186
+ </ >
184
187
) ,
185
188
code : {
186
189
name : 'Terminal' ,
@@ -193,21 +196,24 @@ let tabs = [
193
196
body : ( ) => (
194
197
< p >
195
198
Add < code > tailwindcss</ code > and < code > autoprefixer</ code > to the{ ' ' }
196
- < code > postcss.plugins</ code > object in your < code > nuxt.config.js</ code > file.
199
+ < code > build. postcss.plugins</ code > object in your < code > nuxt.config.js</ code > file.
197
200
</ p >
198
201
) ,
199
202
code : {
200
203
name : 'nuxt.config.js' ,
201
204
lang : 'js' ,
202
- code : ` // https://nuxt.com/docs/api/configuration/nuxt-config
203
- export default defineNuxtConfig({
204
- > postcss: {
205
- > plugins: {
206
- > tailwindcss: {},
207
- > autoprefixer: {},
205
+ code : ` export default {
206
+ build: {
207
+ > postcss: {
208
+ > postcssOptions: {
209
+ > plugins: {
210
+ > tailwindcss: {},
211
+ > autoprefixer: {},
212
+ > },
213
+ > },
208
214
> },
209
- > },
210
- }) ` ,
215
+ }
216
+ }` ,
211
217
} ,
212
218
} ,
213
219
{
@@ -229,7 +235,6 @@ let tabs = [
229
235
> "./pages/**/*.vue",
230
236
> "./plugins/**/*.{js,ts}",
231
237
> "./nuxt.config.{js,ts}",
232
- > "./app.vue",
233
238
> ],
234
239
theme: {
235
240
extend: {},
@@ -253,26 +258,21 @@ let tabs = [
253
258
} ,
254
259
} ,
255
260
{
256
- title : 'Add the CSS file globally ' ,
261
+ title : 'Import the CSS file' ,
257
262
body : ( ) => (
258
263
< p >
259
- Add your newly-created < code > ./assets/css/main.css</ code > to the < code > css</ code > array
260
- in your < code > nuxt.config.js</ code > file.
264
+ Add the newly-created < code > ./assets/css/main.css</ code > file to the < code > css</ code > { ' ' }
265
+ array in the < code > nuxt.config.js</ code > file.
261
266
</ p >
262
267
) ,
263
268
code : {
264
269
name : 'nuxt.config.js' ,
265
270
lang : 'js' ,
266
- code : ` // https://nuxt.com/docs/api/configuration/nuxt-config
267
- export default defineNuxtConfig({
268
- > css: ['~/assets/css/main.css'],
269
- postcss: {
270
- plugins: {
271
- tailwindcss: {},
272
- autoprefixer: {},
273
- },
274
- },
275
- })` ,
271
+ code : ` export default {
272
+ css: [
273
+ > '@/assets/css/main.css',
274
+ ],
275
+ }` ,
276
276
} ,
277
277
} ,
278
278
{
@@ -292,7 +292,7 @@ let tabs = [
292
292
title : 'Start using Tailwind in your project' ,
293
293
body : ( ) => < p > Start using Tailwind’s utility classes to style your content.</ p > ,
294
294
code : {
295
- name : 'app .vue' ,
295
+ name : 'App .vue' ,
296
296
lang : 'html' ,
297
297
code : ` <template>
298
298
> <h1 class="text-3xl font-bold underline">
0 commit comments