Skip to content

generate kit docs from repo #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,203 changes: 431 additions & 1,772 deletions apps/svelte.dev/content/docs/kit/98-reference/[email protected]

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ first post-processing

<div class="ts-block">

```ts
// @noErrors
```dts
function sequence(
...handlers: import('@sveltejs/kit').Handle[]
): import('@sveltejs/kit').Handle;
Expand All @@ -88,3 +87,5 @@ function sequence(
</div>




Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ Make various web APIs available as globals:

<div class="ts-block">

```ts
// @noErrors
```dts
function installPolyfills(): void;
```

</div>




15 changes: 7 additions & 8 deletions apps/svelte.dev/content/docs/kit/98-reference/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,19 @@ Converts a file on disk to a readable stream

<div class="ts-block">

```ts
// @noErrors
```dts
function createReadableStream(file: string): ReadableStream;
```

</div>

## getRequest


## getRequest

<div class="ts-block">

```ts
// @noErrors
```dts
function getRequest({
request,
base,
Expand All @@ -47,14 +45,13 @@ function getRequest({

</div>

## setResponse


## setResponse

<div class="ts-block">

```ts
// @noErrors
```dts
function setResponse(
res: import('http').ServerResponse,
response: Response
Expand All @@ -64,3 +61,5 @@ function setResponse(
</div>




Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ Returns the SvelteKit Vite plugins.

<div class="ts-block">

```ts
// @noErrors
```dts
function sveltekit(): Promise<import('vite').Plugin[]>;
```

</div>




Original file line number Diff line number Diff line change
Expand Up @@ -15,50 +15,54 @@ import { browser, building, dev, version } from '$app/environment';

<div class="ts-block">

```ts
// @noErrors
```dts
const browser: boolean;
```

</div>



## building

SvelteKit analyses your app during the `build` step by running it. During this process, `building` is `true`. This also applies during prerendering.

<div class="ts-block">

```ts
// @noErrors
```dts
const building: boolean;
```

</div>



## dev

Whether the dev server is running. This is not guaranteed to correspond to `NODE_ENV` or `MODE`.

<div class="ts-block">

```ts
// @noErrors
```dts
const dev: boolean;
```

</div>



## version

The value of `config.kit.version.name`.

<div class="ts-block">

```ts
// @noErrors
```dts
const version: string;
```

</div>




15 changes: 9 additions & 6 deletions apps/svelte.dev/content/docs/kit/98-reference/20-$app-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ In case of an error, it redirects to the nearest error page.

<div class="ts-block">

```ts
// @noErrors
```dts
function applyAction<
Success extends Record<string, unknown> | undefined,
Failure extends Record<string, unknown> | undefined
Expand All @@ -31,6 +30,8 @@ function applyAction<

</div>



## deserialize

Use this function to deserialize the response from a form submission.
Expand All @@ -53,8 +54,7 @@ async function handleSubmit(event) {

<div class="ts-block">

```ts
// @noErrors
```dts
function deserialize<
Success extends Record<string, unknown> | undefined,
Failure extends Record<string, unknown> | undefined
Expand All @@ -65,6 +65,8 @@ function deserialize<

</div>



## enhance

This action enhances a `<form>` element that otherwise would work without JavaScript.
Expand All @@ -86,8 +88,7 @@ If you provide a custom function with a callback and want to use the default beh

<div class="ts-block">

```ts
// @noErrors
```dts
function enhance<
Success extends Record<string, unknown> | undefined,
Failure extends Record<string, unknown> | undefined
Expand All @@ -105,3 +106,5 @@ function enhance<
</div>




Loading
Loading