Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit cacdd93

Browse files
committed
Merge branch 'main' of github.com:nuxt/learn.nuxt.com
2 parents ce9314f + facdc5c commit cacdd93

File tree

14 files changed

+7797
-6895
lines changed

14 files changed

+7797
-6895
lines changed

.github/workflows/autofix.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v4
1919

20-
- uses: pnpm/action-setup@v2
20+
- uses: pnpm/action-setup@v4
2121

2222
- name: Use Node.js lts/*
2323
uses: actions/setup-node@v4
2424
with:
2525
node-version: lts/*
26+
cache: pnpm
2627

2728
- name: Install
2829
run: pnpm install

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: pnpm/action-setup@v2
17+
- uses: pnpm/action-setup@v4
1818
- uses: actions/setup-node@v4
1919
with:
2020
node-version: lts/*
21+
cache: pnpm
2122

2223
- name: Install
2324
run: pnpm install

components/FileIcon.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,40 @@ const props = defineProps<{
88
const FILE_ICONS = [
99
{
1010
match: /\.vue$/,
11-
icon: 'i-logos-vue',
11+
icon: 'i-catppuccin-vue',
1212
},
1313
{
1414
match: /nuxt\.config\.\w+$/,
15-
icon: 'i-logos-nuxt-icon scale-110',
15+
icon: 'i-catppuccin-nuxt',
1616
},
1717
{
1818
match: /package\.json$/,
19-
icon: 'i-file-icons-npm text-red scale-110',
19+
icon: 'i-catppuccin-npm',
2020
},
2121
{
2222
match: /\.[mc]?tsx?$/,
23-
icon: 'i-file-icons-typescript-alt text-blue3',
23+
icon: 'i-catppuccin-typescript',
2424
},
2525
{
2626
match: /\.[mc]?jsx?$/,
27-
icon: 'i-devicon-javascript',
27+
icon: 'i-catppuccin-javascript',
2828
},
2929
]
3030
3131
const icon = computed(() => {
3232
if (props.isDirectory) {
3333
return props.isDirectoryOpen
34-
? 'i-ph:folder-open-duotone scale-120'
35-
: 'i-ph:folder-simple-duotone scale-120'
34+
? 'i-catppuccin-folder-open'
35+
: 'i-catppuccin-folder'
3636
}
3737
for (const { match, icon } of FILE_ICONS) {
3838
if (match.test(props.path))
3939
return icon
4040
}
41-
return 'i-ph:file-duotone scale-120'
41+
return 'i-catppuccin-file'
4242
})
4343
</script>
4444

4545
<template>
46-
<div :class="icon" />
46+
<div :class="icon" light="brightness-60 hue-rotate-180 invert-100 saturate-200" scale-110 />
4747
</template>

components/PanelDocs.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import type { NavItem, ParsedContent } from '@nuxt/content'
33
4+
const runtime = useRuntimeConfig()
45
const {
56
navigation,
67
page,
@@ -58,7 +59,7 @@ const ui = useUiState()
5859
5960
const sourceUrl = computed(() =>
6061
page.value?._file
61-
? `https://github.com/nuxt/learn.nuxt.com/edit/main/content/${page.value._file}`
62+
? `${runtime.public.repoUrl}/edit/main/content/${page.value._file}`
6263
: undefined,
6364
)
6465

components/PanelEditorFileSystemTree.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const folderCaret = computed(() => {
5757
:style="{
5858
paddingLeft: `${0.2 + 0.8 * (props.depth)}rem`,
5959
}"
60-
:class="isFileSelected ? 'bg-active' : 'saturate-0 text-faded'"
60+
:class="isFileSelected ? 'bg-active' : 'text-faded'"
6161
w-full flex items-center gap-1 px2 py1 text-left text-sm
6262
@click="handleClick"
6363
>

components/TheNav.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const guide = useGuideStore()
55
const runtime = useRuntimeConfig()
66
const commands = useCommandsStore()
77
8-
const repo = 'https://github.com/nuxt/learn.nuxt.com'
98
const buildTime = new Date(runtime.public.buildTime)
109
const timeAgo = useTimeAgo(buildTime)
1110
@@ -53,7 +52,7 @@ addCommands(
5352
<NuxtTutorialLogo h-2em />
5453
</NuxtLink>
5554
<NuxtLink
56-
:href="repo"
55+
:href="runtime.public.repoUrl"
5756
target="_blank"
5857
>
5958
<div block translate-y--2 rounded bg-orange:10 px2 py1 text-xs text-orange>
@@ -94,7 +93,7 @@ addCommands(
9493
<template #popper>
9594
<div px5 py4 grid="~ gap-y-3 gap-x-2 cols-[max-content_1fr] items-center">
9695
<div i-ph-package-duotone text-xl />
97-
<NuxtLink :to="`${repo}/commit/${runtime.public.gitSha}`" target="_blank" title="View on GitHub">
96+
<NuxtLink :to="`${runtime.public.repoUrl}/commit/${runtime.public.gitSha}`" target="_blank" title="View on GitHub">
9897
<time :datetime="buildTime.toISOString()" :title="buildTime.toLocaleString()">
9998
Built {{ timeAgo }} (<code>{{ runtime.public.gitSha.slice(0, 5) }}</code>)
10099
</time>
@@ -116,7 +115,7 @@ addCommands(
116115
rounded p2
117116
title="GitHub"
118117
hover="bg-active"
119-
:href="repo"
118+
:href="runtime.public.repoUrl"
120119
target="_blank"
121120
>
122121
<div i-carbon-logo-github text-2xl />

content/1.vue/1.index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ogImage: true
66

77
Nuxt integrates [Vue 3](https://vuejs.org/), a progressive framework for building user interfaces. In this section, we will cover the basics of Vue.
88

9-
What you see in the editor is a [Vue Single-File Component](https://vuejs.org/guide/scaling-up/sfc.html)(SFC).
9+
What you see in the editor is a [Vue Single-File Component](https://vuejs.org/guide/scaling-up/sfc.html) (SFC).
1010

1111
An SFC is a reusable self-contained block of code that encapsulates HTML, CSS and JavaScript that belong together, written inside a `.vue` file. It's composed with a [`<script setup>`](https://vuejs.org/api/sfc-script-setup.html) block to define the JavaScript logic, a `<template>` block to define the HTML template and optional `<style>` blocks to define the CSS style. You can play with it using the playground on the right, or read more about it in the [official Vue documentation](https://v3.vuejs.org/guide/single-file-component.html).
1212

monaco/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class WorkerHost {
5656
}
5757
}
5858
}
59-
catch (err) {
59+
catch {
6060
return undefined
6161
}
6262
}

monaco/vue.worker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type * as monaco from 'monaco-editor-core'
44
import * as ts from 'typescript/lib/tsserverlibrary'
55
import type { LanguageServiceEnvironment, VueCompilerOptions } from '@vue/language-service'
66
import { createVueLanguagePlugin, getFullLanguageServicePlugins, resolveVueCompilerOptions } from '@vue/language-service'
7-
import { createTypeScriptWorkerService } from '@volar/monaco/worker'
7+
import { createTypeScriptWorkerLanguageService } from '@volar/monaco/worker'
88
import { URI } from 'vscode-uri'
99
import type { WorkerHost } from './env'
1010

@@ -68,7 +68,7 @@ self.onmessage = () => {
6868
},
6969
}
7070

71-
return createTypeScriptWorkerService({
71+
return createTypeScriptWorkerLanguageService({
7272
typescript: ts,
7373
env,
7474
compilerOptions,

nuxt.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default defineNuxtConfig({
1111
'@pinia/nuxt',
1212
'floating-vue/nuxt',
1313
'@nuxtjs/seo',
14-
'@nuxt/icon',
14+
// '@nuxt/icon',
1515
'@nuxt/eslint',
1616
// local
1717
'~/modules/template-loader',
@@ -67,6 +67,7 @@ export default defineNuxtConfig({
6767
public: {
6868
buildTime: Date.now(),
6969
gitSha: execaSync('git', ['rev-parse', 'HEAD']).stdout.trim(),
70+
repoUrl: 'https://github.com/nuxt/learn.nuxt.com',
7071
},
7172
app: {
7273
devtools: {
@@ -130,4 +131,6 @@ export default defineNuxtConfig({
130131
search: {},
131132
},
132133
},
134+
135+
compatibilityDate: '2024-04-03',
133136
})

0 commit comments

Comments
 (0)