8000 Merge branch 'main' of github.com:nuxt/learn.nuxt.com · vuejs-jp/learn.nuxt.com@cacdd93 · GitHub
[go: up one dir, main page]

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
})

package.json

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "learn.nuxt.com",
33
"type": "module",
44
"private": true,
5-
"packageManager": "pnpm@9.4.0",
5+
"packageManager": "pnpm@9.7.1",
66
"scripts": {
77
"build": "nuxt build",
88
"dev": "nuxt dev",
@@ -15,60 +15,62 @@
1515
"textlint": "textlint --format pretty-error content/**"
1616
},
1717
"dependencies": {
18-
"@shikijs/core": "^1.10.0",
19-
"@shikijs/monaco": "^1.10.0",
20-
"@volar/monaco": "~2.4.0-alpha.12",
21-
"@vue/language-service": "^2.0.26-alpha.2",
18+
"@shikijs/core": "^1.14.1",
19+
"@shikijs/monaco": "^1.14.1",
20+
"@volar/monaco": "~2.4.0",
21+
"@vue/language-service": "^2.0.29",
2222
"@webcontainer/api": "^1.2.0",
2323
"@xterm/addon-fit": "^0.10.0",
2424
"@xterm/xterm": "^5.5.0",
2525
"birpc": "^0.2.17",
2626
"floating-vue": "^5.2.2",
2727
"jszip": "^3.10.1",
2828
"monaco-editor": "^0.50.0",
29-
"shiki": "^1.10.0",
29+
"shiki": "^1.14.1",
3030
"splitpanes": "^3.1.5",
3131
"strip-json-comments": "^5.0.1",
3232
"textlint": "^14.0.4",
3333
"textlint-rule-preset-vuejs-jp": "github:vuejs-jp/textlint-rule-preset-vuejs-jp",
34-
"theme-vitesse": "^0.8.0",
34+
"theme-vitesse": "^0.8.3",
3535
"unified": "^11.0.5",
3636
"vscode-uri": "^3.0.8",
37-
"vue": "^3.4.31",
38-
"vue-router": "^4.4.0"
37+
"vue": "^3.4.38",
38+
"vue-router": "^4.4.3"
3939
},
4040
"devDependencies": {
41-
"@antfu/eslint-config": "^2.21.2",
42-
"@iconify-json/logos": "^1.1.43",
43-
"@iconify/json": "^2.2.224",
44-
"@nuxt/content": "^2.13.0",
45-
"@nuxt/devtools": "^1.3.8",
46-
"@nuxt/eslint": "^0.3.13",
47-
"@nuxt/icon": "^1.0.0",
41+
"@antfu/eslint-config": "^2.26.0",
42+
"@iconify-json/catppuccin": "^1.1.4",
43+
"@iconify-json/logos": "^1.1.44",
44+
"@iconify-json/ph": "^1.1.14",
45+
"@iconify-json/svg-spinners": "^1.1.3",
46+
"@nuxt/content": "^2.13.2",
47+
"@nuxt/devtools": "^1.3.14",
48+
"@nuxt/eslint": "^0.5.1",
49+
"@nuxt/icon": "^1.4.7",
4850
"@nuxt/image": "^1.7.0",
49-
"@nuxt/kit": "^3.12.2",
50-
"@nuxtjs/color-mode": "^3.4.2",
51+
"@nuxt/kit": "^3.12.4",
52+
"@nuxtjs/color-mode": "^3.4.4",
5153
"@nuxtjs/seo": "2.0.0-rc.10",
52-
"@pinia/nuxt": "^0.5.1",
53-
"@unocss/eslint-plugin": "^0.61.0",
54-
"@unocss/extractor-mdc": "^0.61.0",
55-
"@unocss/nuxt": "^0.61.0",
56-
"@vueuse/nuxt": "^10.11.0",
57-
"eslint": "^9.6.0",
54+
"@pinia/nuxt": "^0.5.3",
55+
"@unocss/eslint-plugin": "^0.62.2",
56+
"@unocss/extractor-mdc": "^0.62.2",
57+
"@unocss/nuxt": "^0.62.2",
58+
"@vueuse/nuxt": "^11.0.1",
59+
"eslint": "^9.9.0",
5860
"eslint-plugin-format": "^0.1.2",
59-
"execa": "^9.3.0",
61+
"execa": "^9.3.1",
6062
"fast-glob": "^3.3.2",
6163
"fuse.js": "^7.0.0",
6264
"monaco-editor-core": "^0.50.0",
63-
"nuxt": "^3.12.2",
65+
"nuxt": "^3.12.4",
6466
"pathe": "^1.1.2",
6567
"remark-external-links": "^9.0.1",
66-
"typescript": "^5.5.3",
67-
"vue-tsc": "^2.0.26-alpha.2"
68+
"typescript": "^5.5.4",
69+
"vue-tsc": "^2.0.29"
6870
},
6971
"pnpm": {
7072
"patchedDependencies": {
7173
"splitpanes@3.1.5": "patches/splitpanes@3.1.5.patch"
7274
}
7375
}
74< 3AFB /code>-
}
76+
}

0 commit comments

Comments
 (0)
0