Skip to content

Commit bb1b074

Browse files
committed
Merge branch 'main' into templating-mode-selector
2 parents 4a40ce4 + 52050c7 commit bb1b074

File tree

243 files changed

+3329
-1555
lines changed

Some content is hidden

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

243 files changed

+3329
-1555
lines changed

.github/workflows/docs-preview-create.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,18 @@ jobs:
3939
- uses: actions/checkout@v4
4040
with:
4141
token: ${{ secrets.GH_TOKEN }}
42+
ref: main # Explicitly checkout main branch first
4243
- uses: pnpm/action-setup@v4
4344
- uses: actions/setup-node@v4
4445
with:
4546
node-version: 22
4647
cache: pnpm
4748
- run: pnpm install --frozen-lockfile
4849

49-
- name: Checkout
50-
run: git fetch origin ${{ env.BRANCH }} && git checkout ${{ env.BRANCH }} || git checkout -b ${{ env.BRANCH }}
50+
- name: Create or reset branch from main
51+
run: |
52+
git fetch origin
53+
git checkout -B ${{ env.BRANCH }} # Force create/reset branch based on current main
5154
5255
- name: Sync
5356
run: cd apps/svelte.dev && pnpm sync-docs --owner="${{ inputs.owner }}" -p "${{ inputs.repo }}#${{ inputs.branch }}"
@@ -59,7 +62,7 @@ jobs:
5962
6063
- name: Push
6164
id: push
62-
run: git add -A && git commit -m "sync docs" && git push -u origin ${{ env.BRANCH }}
65+
run: git add -A && git commit -m "sync docs" && git push -u origin ${{ env.BRANCH }} --force
6366

6467
- name: Request preview comment
6568
uses: peter-evans/repository-dispatch@v3

apps/svelte.dev/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414

1515
# TODO remove this after https://github.com/sveltejs/kit/pull/12718 is merged
1616
/content/docs/kit/50-reference
17+
.vercel
18+
.env*.local
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: "What's new in Svelte: May 2025"
3+
description: 'Svelte Summit soon! Plus, await in components'
4+
author: Dani Sandoval
5+
authorURL: https://dreamindani.com
6+
---
7+
8+
Only a week until [Svelte Summit Spring 2025](https://www.sveltesummit.com/)! If you can't make it in-person to Barcelona, you can purchase a virtual ticket [here](https://www.sveltesummit.com/virtual-ticket).
9+
10+
But before that, we've got a few updates to highlight...
11+
12+
## What's new in Svelte and SvelteKit
13+
14+
The Svelte maintainers have been hard at work building out [Asynchronous Svelte](https://github.com/sveltejs/svelte/discussions/15845) this month, but still found the time to ship some helpful features. If you're interested in trying out the async branch, or just want to follow along with the development, check out [feat: allow await in components #15844](https://github.com/sveltejs/svelte/pull/15844)
15+
16+
- Certain expressions will now be partially evaluated to improve runtime performance (**[email protected]/5.28.0**, [#15494](https://github.com/sveltejs/svelte/pull/15494)/[#15781](https://github.com/sveltejs/svelte/pull/15781))
17+
- The Svelte CLI (`sv`) has added a `--install <package-manager>` flag to `create` and `add` to specify which package manager to use when running (**[email protected]**, [#531](https://github.com/sveltejs/cli/pull/531))
18+
- The two separate CloudFlare adapters have been merged into one: `adapter-cloudflare` (**[email protected]**, [#13634](https://github.com/sveltejs/kit/pull/13634))
19+
- `adapter-vercel` will now create symlink functions for each route, for better observability (**[email protected]**, [#13679](https://github.com/sveltejs/kit/pull/13679))
20+
21+
There were a number of fixes in SvelteKit too - including an improvement to the `HandleServerError` hook to give it access to `getRequestEvent`! ([#13666](https://github.com/sveltejs/kit/pull/13666))
22+
23+
For a full list of bug fixes in Svelte, SvelteKit and its adapters, check out their CHANGELOGs [here](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md) and [here](https://github.com/sveltejs/kit/tree/main/packages). Interested in all the new fixes in language tools? You can find them [here](https://github.com/sveltejs/language-tools/releases).
24+
25+
---
26+
27+
## Community Showcase
28+
29+
### Apps & Sites built with Svelte
30+
31+
- [TableSlayer](https://github.com/siege-perilous/tableslayer) is an open source software for managing in person RPG games with digital displays (check out the video demo on [Reddit](https://www.reddit.com/r/sveltejs/comments/1jnco5h/built_with_svelte_my_open_source_software_for/))
32+
- [Iconia](https://iconia.dev/) is a free tool that understands natural language and responds with relevant icons from famous icon libraries
33+
- [CMSDocs](https://cmsdocs.com/) transforms your Google Docs into Blog CMS
34+
- [Svelte Changelog v2](https://svelte-changelog.dev/) is out now and is a reimagined way of staying up to date on all the new changes in the Svelte ecosystem
35+
- [Hookah UI](https://github.com/AdamShannag/hookah-ui) is a visual configuration builder for the Hookah project
36+
- [mockiapi](https://github.com/sfeSantos/mockiapi) is a mock API server that allows you to define endpoints, return custom JSON responses, and simulate real-world API behavior
37+
- [soarSQL](https://soarsql.com/) is an SQL editor made for analytical processing on Postgres, MySQL, and CSVs - powered by duckDB
38+
- [Persona Simulator](https://personasim.fow.sh/) helps you practice your communication skills by chatting with different personas
39+
- [Typo](https://typo.robino.dev/) is a web-based markdown editor with formatting in codeblocks and typescript execution
40+
- [FernOS](https://github.com/mrtechtroid/fernos) is a lightweight operating system running inside your browser
41+
42+
### Learning Resources
43+
44+
_Featuring Svelte Contributors and Ambassadors_
45+
46+
- [SvelteKit is the best way to build single page apps - and it just got even better!](https://www.youtube.com/watch?v=vCMTxL1jWbw) by Stanislav Khromov (Video)
47+
- [Svelte London - April 2025](https://www.youtube.com/watch?v=7m6HExTKAqM)
48+
- Building cross-platform browser extensions with Svelte by Oliver Turner ([10:52](https://www.youtube.com/live/7m6HExTKAqM?si=tWUKbSm2IuhO0N_r&t=652))
49+
- Kioko: Coding CAD by Armel de Montgros and Soloman Azizi ([43:00](https://www.youtube.com/live/7m6HExTKAqM?si=EOmS3Hy-AwIgrBTU&t=2613))
50+
51+
_This Week in Svelte_
52+
53+
- [Ep. 100](https://www.youtube.com/watch?v=BGNykPO4L7c) — Q&A with Rich Harris
54+
- [Ep. 101](https://www.youtube.com/watch?v=yp4330KsYcU) — Changelog
55+
56+
_To Read_
57+
58+
- Graphite - an open source 2D procedural graphics editor built with Svelte - has released a [product update blog post](https://graphite.rs/blog/graphite-progress-report-q4-2024/)
59+
- [Cloudflare Workers & SvelteKit: BetterAuth, Custom Domain, Google OAuth, OTP & Email - Securing Your Application](https://jilles.me/cloudflare-workers-sveltekit-betterauth-custom-domain-google-oauth-otp-email-securing-your-application/) by Jilles Soeters
60+
- [Building a Real-time Dashboard with Flask and Svelte](https://testdriven.io/blog/flask-svelte/) by Amir Tadrisi
61+
- [Copying Nuxt's useState in Qwik and Svelte](https://dev.to/jdgamble555/copying-nuxts-usestate-in-qwik-and-svelte-5eo3) by Jonathan Gamble
62+
63+
### Libraries, Tools & Components
64+
65+
- [diaper](https://github.com/devantic/diaper) is an advanced bottom sheet component for Svelte 5
66+
- [mcp-svelte-docs](https://github.com/spences10/mcp-svelte-docs) is an MCP server that lets you search and access Svelte documentation with built-in caching
67+
- [Version 4 of Anime.js](https://animejs.com/) - a popular JS animation library - has been released
68+
- [DeepWiki](https://deepwiki.com/sveltejs/svelte) has created a comprehensive introduction to the Svelte framework repository
69+
- [Vite Static Assets Plugin](https://www.npmjs.com/package/vite-static-assets-plugin) is a Vite plugin that automatically scans your static assets directory, generates a type-safe TypeScript module with all asset paths to help during build or development time
70+
- [Mode Watcher v1](https://github.com/svecosystem/mode-watcher) provides simple light/dark mode management, now rewritten with first-class Svelte 5 support
71+
72+
That's it for this month! Let us know if we missed anything on [Reddit](https://www.reddit.com/r/sveltejs/) or [Discord](https://discord.gg/svelte).
73+
74+
Until next time 👋🏼!

apps/svelte.dev/content/docs/cli/20-commands/10-sv-create.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,19 @@ Prevent typechecking from being added. Not recommended!
3636

3737
Run the command without the interactive add-ons prompt
3838

39+
### `--install <package-manager>`
40+
41+
Installs dependencies with a specified package manager:
42+
43+
- `npm`
44+
- `pnpm`
45+
- `yarn`
46+
- `bun`
47+
- `deno`
48+
3949
### `--no-install`
4050

41-
Skip dependency installation
51+
Prevents installing dependencies.
4252

4353
<!-- ## Programmatic interface
4454

apps/svelte.dev/content/docs/cli/20-commands/20-sv-add.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,21 @@ You can select multiple space-separated add-ons from [the list below](#Official-
2121

2222
- `-C`, `--cwd` — path to the root of your Svelte(Kit) project
2323
- `--no-preconditions` — skip checking preconditions <!-- TODO what does this mean? -->
24-
- `--no-install` — skip dependency installation
24+
- `--install` — installs dependencies with a specified package manager
25+
- `--no-install` — prevents installing dependencies
2526

2627
## Official add-ons
2728

28-
<!-- TODO this should be a separate section, each of these should have their own page -->
29-
30-
- `drizzle`
31-
- `eslint`
32-
- `sveltekit-adapter`
33-
- `lucia`
34-
- `mdsvex`
35-
- `paraglide`
36-
- `playwright`
37-
- `prettier`
38-
- `storybook`
39-
- `tailwindcss`
40-
- `vitest`
29+
<!-- TODO: it'd be nice for this to live on the "add-ons" page, but we first need svelte.dev to support making pages from headings -->
30+
31+
- [`drizzle`](drizzle)
32+
- [`eslint`](eslint)
33+
- [`lucia`](lucia)
34+
- [`mdsvex`](mdsvex)
35+
- [`paraglide`](paraglide)
36+
- [`playwright`](playwright)
37+
- [`prettier`](prettier)
38+
- [`storybook`](storybook)
39+
- [`sveltekit-adapter`](sveltekit-adapter)
40+
- [`tailwindcss`](tailwind)
41+
- [`vitest`](vitest)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: drizzle
4+
---
5+
6+
[Drizzle ORM](https://orm.drizzle.team/) is a TypeScript ORM offering both relational and SQL-like query APIs, and which is serverless-ready by design.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add drizzle
12+
```
13+
14+
## What you get
15+
16+
- a setup that keeps your database access in SvelteKit's server files
17+
- an `.env` file to store your credentials
18+
- compatibility with the Lucia auth add-on
19+
- an optional Docker configuration to help with running a local database
20+
21+
## Options
22+
23+
### database
24+
25+
Which database variant to use:
26+
27+
- `postgresql` — the most popular open source database
28+
- `mysql` — another popular open source database
29+
- `sqlite` — file-based database not requiring a database server
30+
31+
```bash
32+
npx sv add --drizzle=postgresql
33+
```
34+
35+
### client
36+
37+
The SQL client to use, depends on `database`:
38+
39+
- For `postgresql`: `postgres.js`, `neon`,
40+
- For `mysql`: `mysql2`, `planetscale`
41+
- For `sqlite`: `better-sqlite3`, `libsql`, `turso`
42+
43+
```bash
44+
npx sv add --drizzle=postgresql,postgres.js
45+
```
46+
47+
Drizzle is compatible with well over a dozen database drivers. We just offer a few of the most common ones here for simplicity, but if you'd like to use another one you can choose one as a placeholder and swap it out for another after setup by choosing from [Drizzle's full list of compatible drivers](https://orm.drizzle.team/docs/connect-overview#next-steps).
48+
49+
### docker
50+
51+
Whether to add Docker Compose configuration. Only available for [`database`](#Options-database) `postgresql` or `mysql`
52+
53+
- `docker` - generates `docker-compose.yml`
54+
- `no-docker` - does not generate docker config
55+
56+
```bash
57+
npx sv add --drizzle=postgresql,postgres.js,docker
58+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: eslint
4+
---
5+
6+
[ESLint](https://eslint.org/) finds and fixes problems in your code.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add eslint
12+
```
13+
14+
## What you get
15+
16+
- the relevant packages installed including `eslint-plugin-svelte`
17+
- an `eslint.config.js` file
18+
- updated `.vscode/settings.json`
19+
- configured to work with TypeScript and `prettier` if you're using those packages
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: lucia
4+
---
5+
6+
An auth setup following [the Lucia auth guide](https://lucia-auth.com/).
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add lucia
12+
```
13+
14+
## What you get
15+
16+
- an auth setup for SvelteKit and Drizzle following the best practices from the Lucia auth guide
17+
- optional demo registration and login pages
18+
19+
## Options
20+
21+
### demo
22+
23+
Whether to include demo registration and login pages.
24+
25+
```bash
26+
npx sv add --lucia=demo
27+
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: mdsvex
4+
---
5+
6+
[mdsvex](https://mdsvex.pngwn.io) is a markdown preprocessor for Svelte components - basically MDX for Svelte. It allows you to use Svelte components in your markdown, or markdown in your Svelte components.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add mdsvex
12+
```
13+
14+
## What you get
15+
16+
- mdsvex installed and configured in your `svelte.config.js`
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: paraglide
4+
---
5+
6+
[Paraglide from Inlang](https://inlang.com/m/gerre34r/library-inlang-paraglideJs) is a compiler-based i18n library that emits tree-shakable message functions with small bundle sizes, no async waterfalls, full type-safety, and more.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add paraglide
12+
```
13+
14+
## What you get
15+
16+
- Inlang project settings
17+
- paraglide Vite plugin
18+
- SvelteKit `reroute` and `handle` hooks
19+
- `text-direction` and `lang` attributes in `app.html`
20+
- updated `.gitignore`
21+
- an optional demo page showing how to use paraglide
22+
23+
## Options
24+
25+
### availableLanguageTags
26+
27+
The languages you'd like to support specified as IETF BCP 47 language tags.
28+
29+
```bash
30+
npx sv add --paraglide=en,es
31+
```
32+
33+
### demo
34+
35+
Whether to generate an optional demo page showing how to use paraglide.
36+
37+
```bash
38+
npx sv add --paraglide=demo
39+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: playwright
4+
---
5+
6+
[Playwright](https://playwright.dev) browser testing.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add playwright
12+
```
13+
14+
## What you get
15+
16+
- scripts added in your `package.json`
17+
- a Playwright config file
18+
- an updated `.gitignore`
19+
- a demo test
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: prettier
4+
---
5+
6+
[Prettier](https://prettier.io) is an opinionated code formatter.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add prettier
12+
```
13+
14+
## What you get
15+
16+
- scripts in your `package.json`
17+
- `.prettierignore` and `.prettierrc` files
18+
- updates to your eslint config if you're using that package
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: storybook
4+
---
5+
6+
[Storybook](https://storybook.js.org/) is a frontend component workshop.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add storybook
12+
```
13+
14+
## What you get
15+
16+
- `npx storybook init` run for you from the same convenient `sv` CLI used for all other add-ons
17+
- [Storybook for SvelteKit](https://storybook.js.org/docs/get-started/frameworks/sveltekit) or [Storybook for Svelte & Vite](https://storybook.js.org/docs/get-started/frameworks/svelte-vite) with default config provided, easy mocking of many SvelteKit modules, automatic link handling, and more.

0 commit comments

Comments
 (0)