Skip to content

Commit 36cab06

Browse files
authored
Merge pull request #6 from tomoam/merge-with-sveltejs
2024-11-11迄の更新に追従
2 parents eadfc2d + 1ceb559 commit 36cab06

File tree

320 files changed

+4862
-2886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

320 files changed

+4862
-2886
lines changed
+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Docs preview create
2+
3+
on:
4+
repository_dispatch:
5+
types: [docs-preview-create]
6+
7+
env:
8+
BRANCH: preview-${{ github.event.client_payload.package }}-${{ github.event.client_payload.pr }}
9+
10+
jobs:
11+
Sync:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
token: ${{ secrets.GH_TOKEN }}
17+
- uses: pnpm/action-setup@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 22
21+
cache: pnpm
22+
- run: pnpm install --frozen-lockfile
23+
24+
- name: Checkout
25+
run: git fetch origin ${{ env.BRANCH }} && git checkout ${{ env.BRANCH }} || git checkout -b ${{ env.BRANCH }}
26+
27+
- name: Sync
28+
run: cd apps/svelte.dev && pnpm sync-docs --owner="${{ github.event.client_payload.owner }}" -p "${{ github.event.client_payload.package }}#${{ github.event.client_payload.branch }}"
29+
30+
- name: Configure Git
31+
run: |
32+
git config --global user.name "GitHub Actions Bot"
33+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
34+
35+
- name: Push
36+
id: push
37+
run: git add -A && git commit -m "sync docs" && git push -u origin ${{ env.BRANCH }}
38+
39+
- name: Find comment
40+
id: fc
41+
uses: peter-evans/find-comment@v3
42+
with:
43+
token: ${{ secrets.COMMENTER_TOKEN }}
44+
repository: ${{ github.event.client_payload.repo }}
45+
issue-number: ${{ github.event.client_payload.pr }}
46+
comment-author: 'Rich-Harris' # it's using my personal access token, not sure if there's a way to comment as a bot instead
47+
body-includes: _this is an automated message_
48+
49+
- name: Create comment
50+
if: steps.fc.outputs.comment-id == ''
51+
uses: peter-evans/create-or-update-comment@v4
52+
with:
53+
token: ${{ secrets.COMMENTER_TOKEN }}
54+
repository: ${{ github.event.client_payload.repo }}
55+
issue-number: ${{ github.event.client_payload.pr }}
56+
body: |
57+
preview: https://svelte-dev-git-${{ env.BRANCH }}-svelte.vercel.app/
58+
59+
_this is an automated message_
60+
edit-mode: replace
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Docs preview delete
2+
3+
on:
4+
repository_dispatch:
5+
types: [docs-preview-delete]
6+
7+
env:
8+
BRANCH: preview-${{ github.event.client_payload.package }}-${{ github.event.client_payload.pr }}
9+
10+
jobs:
11+
Sync:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
token: ${{ secrets.GH_TOKEN }}
17+
18+
- name: Delete branch
19+
run: git push origin :${{ env.BRANCH }}

.github/workflows/sync-docs.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Sync docs
2+
3+
on:
4+
repository_dispatch:
5+
types: [sync-request]
6+
7+
jobs:
8+
Sync:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: pnpm/action-setup@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 22
16+
cache: pnpm
17+
- run: pnpm install --frozen-lockfile
18+
19+
- name: Sync
20+
run: cd apps/svelte.dev && pnpm sync-docs -p ${{ github.event.client_payload.package }}
21+
22+
- name: Create or update pull request
23+
uses: peter-evans/create-pull-request@v7
24+
with:
25+
commit-message: sync ${{ github.event.client_payload.package }} docs
26+
title: Sync `${{ github.event.client_payload.package }}` docs
27+
body: This is an automated pull request. See the [README](../tree/main/apps/svelte.dev/scripts/sync-docs/README.md) for more information
28+
branch: sync-${{ github.event.client_payload.package }}
29+
base: main

apps/kit.svelte.dev/vercel.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@
77
"permanent": true
88
},
99
{
10-
"source": "/docs/modules",
11-
"destination": "https://svelte.dev/docs/kit/@sveltejs-kit"
10+
"source": "/docs/layouts",
11+
"destination": "https://svelte.dev/docs/kit/routing",
12+
"permanent": true
13+
},
14+
{
15+
"source": "/docs/loading",
16+
"destination": "https://svelte.dev/docs/kit/load",
17+
"permanent": true
1218
},
1319
{
1420
"source": "/docs/types",

apps/learn.svelte.dev/vercel.json

+23-31
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
},
9696
{
9797
"source": "/tutorial/event-forwarding",
98-
"destination": "https://svelte.dev/tutorial/svelte/event-forwarding"
98+
"destination": "https://github.com/sveltejs/svelte/blob/ac6d8c0bf4534221818c634286c7c9b1b7fd91d3/documentation/tutorial/05-events/05-event-forwarding/app-b/App.svelte"
9999
},
100100
{
101101
"source": "/tutorial/dom-event-forwarding",
@@ -131,47 +131,47 @@
131131
},
132132
{
133133
"source": "/tutorial/marked",
134-
"destination": "https://svelte.dev/tutorial/svelte/marked"
134+
"destination": "https://svelte.dev/tutorial/svelte/textarea-inputs"
135135
},
136136
{
137137
"source": "/tutorial/onmount",
138-
"destination": "https://svelte.dev/tutorial/svelte/onmount"
138+
"destination": "https://svelte.dev/docs/svelte/lifecycle-hooks"
139139
},
140140
{
141141
"source": "/tutorial/update",
142-
"destination": "https://svelte.dev/tutorial/svelte/update"
142+
"destination": "https://svelte.dev/docs/svelte/lifecycle-hooks"
143143
},
144144
{
145145
"source": "/tutorial/elizabot",
146-
"destination": "https://svelte.dev/tutorial/svelte/elizabot"
146+
"destination": "https://github.com/sveltejs/svelte/blob/ac6d8c0bf4534221818c634286c7c9b1b7fd91d3/documentation/tutorial/07-lifecycle/03-update/text.md"
147147
},
148148
{
149149
"source": "/tutorial/tick",
150-
"destination": "https://svelte.dev/tutorial/svelte/tick"
150+
"destination": "https://svelte.dev/docs/svelte/lifecycle-hooks#tick"
151151
},
152152
{
153153
"source": "/tutorial/writable-stores",
154-
"destination": "https://svelte.dev/tutorial/svelte/writable-stores"
154+
"destination": "https://svelte.dev/tutorial/svelte/introducing-stores"
155155
},
156156
{
157157
"source": "/tutorial/auto-subscriptions",
158-
"destination": "https://svelte.dev/tutorial/svelte/auto-subscriptions"
158+
"destination": "https://svelte.dev/docs/svelte/stores"
159159
},
160160
{
161161
"source": "/tutorial/readable-stores",
162-
"destination": "https://svelte.dev/tutorial/svelte/readable-stores"
162+
"destination": "https://svelte.dev/docs/svelte/stores"
163163
},
164164
{
165165
"source": "/tutorial/derived-stores",
166-
"destination": "https://svelte.dev/tutorial/svelte/derived-stores"
166+
"destination": "https://svelte.dev/docs/svelte/stores"
167167
},
168168
{
169169
"source": "/tutorial/custom-stores",
170-
"destination": "https://svelte.dev/tutorial/svelte/custom-stores"
170+
"destination": "https://svelte.dev/docs/svelte/stores"
171171
},
172172
{
173173
"source": "/tutorial/store-bindings",
174-
"destination": "https://svelte.dev/tutorial/svelte/store-bindings"
174+
"destination": "https://github.com/sveltejs/svelte/blob/ac6d8c0bf4534221818c634286c7c9b1b7fd91d3/documentation/tutorial/08-stores/06-store-bindings/text.md"
175175
},
176176
{
177177
"source": "/tutorial/tweens",
@@ -219,7 +219,7 @@
219219
},
220220
{
221221
"source": "/tutorial/animate",
222-
"destination": "https://svelte.dev/tutorial/svelte/animate"
222+
"destination": "https://svelte.dev/tutorial/svelte/animations"
223223
},
224224
{
225225
"source": "/tutorial/actions",
@@ -229,10 +229,6 @@
229229
"source": "/tutorial/adding-parameters-to-actions",
230230
"destination": "https://svelte.dev/tutorial/svelte/adding-parameters-to-actions"
231231
},
232-
{
233-
"source": "/tutorial/core",
234-
"destination": "https://svelte.dev/tutorial/svelte/core"
235-
},
236232
{
237233
"source": "/tutorial/tippy.js",
238234
"destination": "https://svelte.dev/tutorial/svelte/tippy.js"
@@ -283,35 +279,35 @@
283279
},
284280
{
285281
"source": "/tutorial/slots",
286-
"destination": "https://svelte.dev/tutorial/svelte/slots"
282+
"destination": "https://svelte.dev/docs/svelte/legacy-slots"
287283
},
288284
{
289285
"source": "/tutorial/named-slots",
290-
"destination": "https://svelte.dev/tutorial/svelte/named-slots"
286+
"destination": "https://svelte.dev/docs/svelte/legacy-slots"
291287
},
292288
{
293289
"source": "/tutorial/slot-fallbacks",
294-
"destination": "https://svelte.dev/tutorial/svelte/slot-fallbacks"
290+
"destination": "https://svelte.dev/docs/svelte/legacy-slots"
295291
},
296292
{
297293
"source": "/tutorial/slot-props",
298-
"destination": "https://svelte.dev/tutorial/svelte/slot-props"
294+
"destination": "https://svelte.dev/docs/svelte/legacy-slots"
299295
},
300296
{
301297
"source": "/tutorial/optional-slots",
302-
"destination": "https://svelte.dev/tutorial/svelte/optional-slots"
298+
"destination": "https://svelte.dev/docs/svelte/legacy-$$slots"
303299
},
304300
{
305301
"source": "/tutorial/context-api",
306302
"destination": "https://svelte.dev/tutorial/svelte/context-api"
307303
},
308304
{
309305
"source": "/tutorial/svelte-self",
310-
"destination": "https://svelte.dev/tutorial/svelte/svelte-self"
306+
"destination": "https://svelte.dev/docs/svelte/legacy-svelte-self"
311307
},
312308
{
313309
"source": "/tutorial/svelte-component",
314-
"destination": "https://svelte.dev/tutorial/svelte/svelte-component"
310+
"destination": "https://svelte.dev/docs/svelte/legacy-svelte-component"
315311
},
316312
{
317313
"source": "/tutorial/svelte-element",
@@ -339,11 +335,11 @@
339335
},
340336
{
341337
"source": "/tutorial/svelte-options",
342-
"destination": "https://svelte.dev/tutorial/svelte/svelte-options"
338+
"destination": "https://svelte.dev/docs/svelte/svelte-options"
343339
},
344340
{
345341
"source": "/tutorial/svelte-fragment",
346-
"destination": "https://svelte.dev/tutorial/svelte/svelte-fragment"
342+
"destination": "https://svelte.dev/docs/svelte/legacy-svelte-fragment"
347343
},
348344
{
349345
"source": "/tutorial/sharing-code",
@@ -355,7 +351,7 @@
355351
},
356352
{
357353
"source": "/tutorial/debug",
358-
"destination": "https://svelte.dev/tutorial/svelte/debug"
354+
"destination": "https://svelte.dev/docs/svelte/@debug"
359355
},
360356
{
361357
"source": "/tutorial/congratulations",
@@ -457,10 +453,6 @@
457453
"source": "/tutorial/redirects",
458454
"destination": "https://svelte.dev/tutorial/kit/redirects"
459455
},
460-
{
461-
"source": "/tutorial/xx-custom-error-messages",
462-
"destination": "https://svelte.dev/tutorial/kit/xx-custom-error-messages"
463-
},
464456
{
465457
"source": "/tutorial/handle",
466458
"destination": "https://svelte.dev/tutorial/kit/handle"

apps/svelte.dev/content/blog/2017-09-06-the-zen-of-just-writing-css.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Everything in CSS is global. Because of that, styles intended for one bit of mar
1919

2020
It gets worse when you're working on a team. No-one dares touch styles authored by someone else, because it's often unclear what they're doing, what markup they apply to, and what disasters will unfold if you remove them.
2121

22-
The consequence of all this is the **append-only stylesheet**. There's no way of knowing which code can safely be removed, so it's common to undo some existing style with another, more specific style — even on relatively small projects.
22+
The consequence of all this is the **append-only stylesheet**. There's no way of knowing which code can safely be removed, so it's common to undo some existing style with another, more specific style — even on relatively small projects.
2323

2424
## Single File Components change all that
2525

apps/svelte.dev/content/blog/2017-12-31-sapper-towards-the-ideal-web-app-framework.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ JavaScript の世界は [このモデルに向かっています](https://tomdal
7777

7878
Glimmerといえば、コンポーネントをバイトコードにコンパイルするというアイディアは、2018年にはおそらく盗むことになるでしょう。 Sapper のようなフレームワークは、アプリの特性に応じてどのコンパイルモードを使うかを決めることができます 。 初回のルーティングでは JavaScript を提供して起動時間を最短にし、その後のルーティングではバイトコードインタプリタを遅延なく提供することで、起動サイズとアプリ全体のサイズの最適な組み合わせを実現することもできます。
7979

80-
とは言え、 Sapper の方向性の大部分はユーザーに決めてもらいたいと考えています。あなたが最先端の生活を楽しみ、 Web アプリケーションの構築方法の未来を形作る手助けをしたいと思っている開発者であれば、ぜひ私たちの [GitHub](https://github.com/sveltejs/svelte)[Discord](https://svelte.dev/chat) に参加してください。
80+
とは言え、 Sapper の方向性の大部分はユーザーに決めてもらいたいと考えています。あなたが最先端の生活を楽しみ、 Web アプリケーションの構築方法の未来を形作る手助けをしたいと思っている開発者であれば、ぜひ私たちの [GitHub](https://github.com/sveltejs/svelte)[Discord](/chat) に参加してください。

apps/svelte.dev/content/blog/2018-04-18-version-2.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Almost a year after we first started talking about version 2 on the Svelte issue
1111

1212
## tl;dr
1313

14-
Each of these items is described in more depth below. If you get stuck, ask for help in our friendly [Discord chatroom](https://svelte.dev/chat).
14+
Each of these items is described in more depth below. If you get stuck, ask for help in our friendly [Discord chatroom](/chat).
1515

1616
- Install Svelte v2 from npm
1717
- Upgrade your templates with [svelte-upgrade](https://github.com/sveltejs/svelte-upgrade)
@@ -198,4 +198,4 @@ Before, there was a `svelte.validate` method which checked your component was va
198198

199199
## My app is broken! Help!
200200

201-
Hopefully this covers everything, and the update should be easier for you than it was for us. But if you find bugs, or discover things that aren't mentioned here, swing by [Discord chatroom](https://svelte.dev/chat) or raise an issue on the [tracker](https://github.com/sveltejs/svelte/issues).
201+
Hopefully this covers everything, and the update should be easier for you than it was for us. But if you find bugs, or discover things that aren't mentioned here, swing by [Discord chatroom](/chat) or raise an issue on the [tracker](https://github.com/sveltejs/svelte/issues).

apps/svelte.dev/content/blog/2019-01-31-svelte-on-the-changelog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Earlier this month, I had the privilege of appearing on [The Changelog](https://
1414

1515
...and, most importantly, Svelte 3.
1616

17-
Unless you hang out in our [Discord server](https://svelte.dev/chat) or follow [@sveltejs](https://twitter.com/sveltejs) on Twitter, you might not know that Svelte 3 is just around the corner, and it's going to be a huge release. We've rethought the developer experience from the ground up, and while it _will_ be a nuisance if you need to upgrade a Svelte 2 app (more on that soon) we think you're going to love it.
17+
Unless you hang out in our [Discord server](/chat) or follow [@sveltejs](https://twitter.com/sveltejs) on Twitter, you might not know that Svelte 3 is just around the corner, and it's going to be a huge release. We've rethought the developer experience from the ground up, and while it _will_ be a nuisance if you need to upgrade a Svelte 2 app (more on that soon) we think you're going to love it.
1818

1919
On the podcast [Adam](https://twitter.com/adamstac), [Jerod](https://twitter.com/jerodsanto) and I talk about some of the changes and why we're making them. You can listen here or on the [podcast page](https://changelog.com/podcast/332).
2020

apps/svelte.dev/content/blog/2019-04-16-svelte-for-new-developers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This short guide is designed to help you — someone who has looked at the [tuto
99

1010
If there are things that don't make sense, or that we're glossing over, feel free to [raise an issue](https://github.com/sveltejs/svelte/issues) or [suggest edits to this page](https://github.com/sveltejs/svelte/blob/master/site/content/blog/2019-04-16-svelte-for-new-developers.md) that will help us help more people.
1111

12-
If you get stuck at any point following this guide, the best place to ask for help is in the [chatroom](https://svelte.dev/chat).
12+
If you get stuck at any point following this guide, the best place to ask for help is in the [chatroom](/chat).
1313

1414
## First things first
1515

0 commit comments

Comments
 (0)