Skip to content

Commit e75aba6

Browse files
authored
Merge branch 'main' into update-autocomplete
2 parents 3119c41 + 808116b commit e75aba6

File tree

322 files changed

+6347
-2843
lines changed

Some content is hidden

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

322 files changed

+6347
-2843
lines changed
Lines changed: 60 additions & 0 deletions
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
Lines changed: 19 additions & 0 deletions
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

Lines changed: 29 additions & 0 deletions
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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
"destination": "https://svelte.dev/docs/kit/load",
1717
"permanent": true
1818
},
19-
{
20-
"source": "/docs/modules",
21-
"destination": "https://svelte.dev/docs/kit/@sveltejs-kit"
22-
},
2319
{
2420
"source": "/docs/types",
2521
"destination": "https://svelte.dev/docs/kit/@sveltejs-kit"

apps/learn.svelte.dev/vercel.json

Lines changed: 23 additions & 31 deletions
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/2016-11-26-frameworks-without-the-framework.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The [Svelte implementation of TodoMVC](https://svelte-todomvc.surge.sh/) weighs
3232

3333
And once your app _is_ up and running, according to [js-framework-benchmark](https://github.com/krausest/js-framework-benchmark) **Svelte is fast as heck**. It's faster than React. It's faster than Vue. It's faster than Angular, or Ember, or Ractive, or Preact, or Riot, or Mithril. It's competitive with Inferno, which is probably the fastest UI framework in the world, for now, because [Dominic Gannaway](https://twitter.com/trueadm) is a wizard. (Svelte is slower at removing elements. We're [working on it](https://github.com/sveltejs/svelte/issues/26).)
3434

35-
It's basically as fast as vanilla JS, which makes sense because it _is_ vanilla JS – just vanilla JS that you didn't have to write.
35+
It's basically as fast as vanilla JS, which makes sense because it _is_ vanilla JS – just vanilla JS that you didn't have to write.
3636

3737
## But that's not the important thing
3838

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ I believe the next frontier of web performance is 'whole-app optimisation'. Curr
7777

7878
Speaking of Glimmer, the idea of compiling components to bytecode is one that we'll probably steal in 2018. A framework like Sapper could conceivably determine which compilation mode to use based on the characteristics of your app. It could even serve JavaScript for the initial route for the fastest possible startup time, then lazily serve a bytecode interpreter for subsequent routes, resulting in the optimal combination of startup size and total app size.
7979

80-
Mostly, though, we want the direction of Sapper to be determined by its users. If you're the kind of developer who enjoys life on the bleeding edge and would like to help shape the future of how we build web apps, please join us on [GitHub](https://github.com/sveltejs/svelte) and [Discord](https://svelte.dev/chat).
80+
Mostly, though, we want the direction of Sapper to be determined by its users. If you're the kind of developer who enjoys life on the bleeding edge and would like to help shape the future of how we build web apps, please join us on [GitHub](https://github.com/sveltejs/svelte) and [Discord](/chat).

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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)