Skip to content

Commit d189f90

Browse files
committed
chore: make current nuxt version first in list
1 parent 62f134e commit d189f90

File tree

1 file changed

+68
-68
lines changed

1 file changed

+68
-68
lines changed

src/pages/docs/guides/nuxtjs.js

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,34 @@ import { TabBar } from '@/components/Guides/TabBar.jsx'
66

77
let tabs = [
88
{
9-
name: 'Nuxt 2',
10-
href: '#2',
9+
name: 'Nuxt 3',
10+
href: '#3',
1111
steps: [
1212
{
1313
title: 'Create your project',
1414
body: () => (
1515
<p>
1616
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+
.
1922
</p>
2023
),
2124
code: {
2225
name: 'Terminal',
2326
lang: 'terminal',
24-
code: 'npx create-nuxt-app my-project\ncd my-project',
27+
code: 'npx nuxi init my-project\ncd my-project',
2528
},
2629
},
2730
{
2831
title: 'Install Tailwind CSS',
2932
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>
3637
),
3738
code: {
3839
name: 'Terminal',
@@ -45,24 +46,21 @@ let tabs = [
4546
body: () => (
4647
<p>
4748
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.
4950
</p>
5051
),
5152
code: {
5253
name: 'nuxt.config.js',
5354
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: {},
6361
> },
64-
}
65-
}`,
62+
> },
63+
})`,
6664
},
6765
},
6866
{
@@ -84,6 +82,7 @@ let tabs = [
8482
> "./pages/**/*.vue",
8583
> "./plugins/**/*.{js,ts}",
8684
> "./nuxt.config.{js,ts}",
85+
> "./app.vue",
8786
> ],
8887
theme: {
8988
extend: {},
@@ -107,21 +106,26 @@ let tabs = [
107106
},
108107
},
109108
{
110-
title: 'Import the CSS file',
109+
title: 'Add the CSS file globally',
111110
body: () => (
112111
<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.
115114
</p>
116115
),
117116
code: {
118117
name: 'nuxt.config.js',
119118
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+
})`,
125129
},
126130
},
127131
{
@@ -141,7 +145,7 @@ let tabs = [
141145
title: 'Start using Tailwind in your project',
142146
body: () => <p>Start using Tailwind’s utility classes to style your content.</p>,
143147
code: {
144-
name: 'App.vue',
148+
name: 'app.vue',
145149
lang: 'html',
146150
code: ` <template>
147151
> <h1 class="text-3xl font-bold underline">
@@ -153,34 +157,33 @@ let tabs = [
153157
],
154158
},
155159
{
156-
name: 'Nuxt 3',
157-
href: '#3',
160+
name: 'Nuxt 2',
161+
href: '#2',
158162
steps: [
159163
{
160164
title: 'Create your project',
161165
body: () => (
162166
<p>
163167
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>.
169170
</p>
170171
),
171172
code: {
172173
name: 'Terminal',
173174
lang: 'terminal',
174-
code: 'npx nuxi init my-project\ncd my-project',
175+
code: 'npx create-nuxt-app my-project\ncd my-project',
175176
},
176177
},
177178
{
178179
title: 'Install Tailwind CSS',
179180
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+
</>
184187
),
185188
code: {
186189
name: 'Terminal',
@@ -193,21 +196,24 @@ let tabs = [
193196
body: () => (
194197
<p>
195198
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.
197200
</p>
198201
),
199202
code: {
200203
name: 'nuxt.config.js',
201204
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+
> },
208214
> },
209-
> },
210-
})`,
215+
}
216+
}`,
211217
},
212218
},
213219
{
@@ -229,7 +235,6 @@ let tabs = [
229235
> "./pages/**/*.vue",
230236
> "./plugins/**/*.{js,ts}",
231237
> "./nuxt.config.{js,ts}",
232-
> "./app.vue",
233238
> ],
234239
theme: {
235240
extend: {},
@@ -253,26 +258,21 @@ let tabs = [
253258
},
254259
},
255260
{
256-
title: 'Add the CSS file globally',
261+
title: 'Import the CSS file',
257262
body: () => (
258263
<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.
261266
</p>
262267
),
263268
code: {
264269
name: 'nuxt.config.js',
265270
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+
}`,
276276
},
277277
},
278278
{
@@ -292,7 +292,7 @@ let tabs = [
292292
title: 'Start using Tailwind in your project',
293293
body: () => <p>Start using Tailwind’s utility classes to style your content.</p>,
294294
code: {
295-
name: 'app.vue',
295+
name: 'App.vue',
296296
lang: 'html',
297297
code: ` <template>
298298
> <h1 class="text-3xl font-bold underline">

0 commit comments

Comments
 (0)