Skip to content

Commit 46b5486

Browse files
authored
Merge branch 'sveltejs:master' into typed-fetch-experiment
2 parents 00c4b11 + 7aa16ba commit 46b5486

File tree

6 files changed

+107
-39
lines changed

6 files changed

+107
-39
lines changed

documentation/docs/10-getting-started/10-introduction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ title: Introduction
1212

1313
SvelteKit is a framework for rapidly developing robust, performant web applications using [Svelte](https://svelte.dev/). If you're coming from React, SvelteKit is similar to Next. If you're coming from Vue, SvelteKit is similar to Nuxt.
1414

15+
To learn more about the kinds of applications you can build with SvelteKit, see the [FAQ](/faq#what-can-i-make-with-sveltekit).
16+
1517
## What is Svelte?
1618

1719
In short, Svelte is a way of writing user interface components — like a navigation bar, comment section, or contact form — that users see and interact with in their browsers. The Svelte compiler converts your components to JavaScript that can be run to render the HTML for the page and to CSS that styles the page. You don't need to know Svelte to understand the rest of this guide, but it will help. If you'd like to learn more, check out [the Svelte tutorial](https://svelte.dev/tutorial).

documentation/docs/25-build-and-deploy/99-writing-adapters.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ export default function (options) {
2626
}
2727
```
2828

29-
The types for `Adapter` and its parameters are available in [types/index.d.ts](https://github.com/sveltejs/kit/blob/master/packages/kit/types/index.d.ts).
30-
3129
Within the `adapt` method, there are a number of things that an adapter should do:
3230

3331
- Clear out the build directory
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: What can I make with SvelteKit?
3+
---
4+
5+
SvelteKit can be used to create most kinds of applications. Out of the box, SvelteKit supports many features including:
6+
7+
- Dynamic page content with [load](/docs/load) functions and [API routes](/docs/routing#server).
8+
- SEO-friendly dynamic content with [server-side rendering (SSR)](/docs/glossary#ssr).
9+
- User-friendly progressively-enhanced interactive pages with SSR and [Form Actions](/docs/form-actions).
10+
- Static pages with [prerendering](/docs/page-options#prerender).
11+
12+
SvelteKit can also be deployed to a wide spectrum of hosted architectures via [adapters](/docs/adapters). In cases where SSR is used (or server-side logic is added without prerendering), those functions will be adapted to the target backend. Some examples include:
13+
14+
- Self-hosted dynamic web applications with a [Node.js backend](/docs/adapter-node).
15+
- Serverless web applications with backend loaders and APIs deployed as remote functions. See [zero-config deployments](/docs/adapter-auto) for popular deployment options.
16+
- [Static pre-rendered sites](/docs/adapter-static) such as a blog or multi-page site hosted on a CDN or static host. Statically-generated sites are shipped without a backend.
17+
- [Single-page Applications (SPAs)](/docs/single-page-apps) with client-side routing and rendering for API-driven dynamic content. SPAs are shipped without a backend and are not server-rendered. This option is commonly chosen when bundling SvelteKit with an app written in PHP, .Net, Java, C, Golang, Rust, etc.
18+
- A mix of the above; some routes can be static, and some routes can use backend functions to fetch dynamic information. This can be configured with [page options](/docs/page-options) that includes the option to opt out of SSR.
19+
20+
In order to support SSR, a JS backend — such as Node.js or Deno-based server, serverless function, or edge function — is required.
21+
22+
It is also possible to write custom adapters or leverage community adapters to deploy SvelteKit to more platforms such as specialized server environments, browser extensions, or native applications. See [How do I use X with SvelteKit](#integrations) for more examples and integrations.

packages/kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@types/node": "^16.18.6",
3333
"@types/sade": "^1.7.4",
3434
"@types/set-cookie-parser": "^2.4.2",
35-
"dts-buddy": "^0.0.10",
35+
"dts-buddy": "^0.1.9",
3636
"marked": "^4.2.3",
3737
"rollup": "^3.7.0",
3838
"svelte": "^4.0.5",

packages/kit/src/core/adapt/builder.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export function create_builder({
154154
write(dest, fallback);
155155
},
156156

157-
generateManifest: ({ relativePath, routes: subset }) => {
157+
generateManifest({ relativePath, routes: subset }) {
158158
return generate_manifest({
159159
build_data,
160160
relative_path: relativePath,
@@ -189,15 +189,7 @@ export function create_builder({
189189
return Array.from(new Set([...server_assets, ...client_assets]));
190190
},
191191

192-
// @ts-expect-error
193-
writePrerendered(dest, opts) {
194-
// TODO remove for 1.0
195-
if (opts?.fallback) {
196-
throw new Error(
197-
'The fallback option no longer exists — use builder.generateFallback(fallback) instead'
198-
);
199-
}
200-
192+
writePrerendered(dest) {
201193
const source = `${config.kit.outDir}/output/prerendered`;
202194
return [...copy(`${source}/pages`, dest), ...copy(`${source}/dependencies`, dest)];
203195
},

pnpm-lock.yaml

Lines changed: 80 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)