Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2803d01

Browse files
Synckit docs (#1402)
sync kit docsCo-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent73922ea commit2803d01

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

‎apps/svelte.dev/content/docs/kit/10-getting-started/30-project-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Project structure
55

66
A typical SvelteKit project looks like this:
77

8-
```bash
8+
```tree
99
my-project/
1010
├ src/
1111
│ ├ lib/

‎apps/svelte.dev/content/docs/kit/25-build-and-deploy/40-adapter-node.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@ node +++--env-file=.env+++ build
6565

6666
By default, the server will accept connections on`0.0.0.0` using port 3000. These can be customised with the`PORT` and`HOST` environment variables:
6767

68-
```
68+
```bash
6969
HOST=127.0.0.1 PORT=4000 node build
7070
```
7171

7272
Alternatively, the server can be configured to accept connections on a specified socket path. When this is done using the`SOCKET_PATH` environment variable, the`HOST` and`PORT` environment variables will be disregarded.
7373

74-
```
74+
```bash
7575
SOCKET_PATH=/tmp/socket node build
7676
```
7777

7878
###`ORIGIN`,`PROTOCOL_HEADER`,`HOST_HEADER`, and`PORT_HEADER`
7979

8080
HTTP doesn't give SvelteKit a reliable way to know the URL that is currently being requested. The simplest way to tell SvelteKit where the app is being served is to set the`ORIGIN` environment variable:
8181

82-
```
82+
```bash
8383
ORIGIN=https://my.site node build
8484

8585
# or e.g. for local previewing and testing
@@ -88,7 +88,7 @@ ORIGIN=http://localhost:3000 node build
8888

8989
With this, a request for the`/stuff` pathname will correctly resolve to`https://my.site/stuff`. Alternatively, you can specify headers that tell SvelteKit about the request protocol and host, from which it can construct the origin URL:
9090

91-
```
91+
```bash
9292
PROTOCOL_HEADER=x-forwarded-proto HOST_HEADER=x-forwarded-host node build
9393
```
9494

@@ -104,7 +104,7 @@ If `adapter-node` can't correctly determine the URL of your deployment, you may
104104

105105
The[`RequestEvent`](@sveltejs-kit#RequestEvent) object passed to hooks and endpoints includes an`event.getClientAddress()` function that returns the client's IP address. By default this is the connecting`remoteAddress`. If your server is behind one or more proxies (such as a load balancer), this value will contain the innermost proxy's IP address rather than the client's, so we need to specify an`ADDRESS_HEADER` to read the address from:
106106

107-
```
107+
```bash
108108
ADDRESS_HEADER=True-Client-IP node build
109109
```
110110

@@ -175,7 +175,7 @@ If you need to change the name of the environment variables used to configure th
175175
envPrefix:'MY_CUSTOM_';
176176
```
177177

178-
```sh
178+
```bash
179179
MY_CUSTOM_HOST=127.0.0.1 \
180180
MY_CUSTOM_PORT=4000 \
181181
MY_CUSTOM_ORIGIN=https://my.site \

‎apps/svelte.dev/content/docs/kit/25-build-and-deploy/60-adapter-cloudflare.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Functions contained in the [`/functions` directory](https://developers.cloudflar
123123

124124
##Runtime APIs
125125

126-
The[`env`](https://developers.cloudflare.com/workers/runtime-apis/fetch-event#parameters) object contains your project's[bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/), which consist of KV/DO namespaces, etc. It is passed to SvelteKit via the`platform` property, along with[`context`](https://developers.cloudflare.com/workers/runtime-apis/context/),[`caches`](https://developers.cloudflare.com/workers/runtime-apis/cache/), and[`cf`](https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties), meaning that you can access it in hooks and endpoints:
126+
The[`env`](https://developers.cloudflare.com/workers/runtime-apis/fetch-event#parameters) object contains your project's[bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/), which consist of KV/DO namespaces, etc. It is passed to SvelteKit via the`platform` property, along with[`ctx`](https://developers.cloudflare.com/workers/runtime-apis/context/),[`caches`](https://developers.cloudflare.com/workers/runtime-apis/cache/), and[`cf`](https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties), meaning that you can access it in hooks and endpoints:
127127

128128
```js
129129
// @errors: 7031

‎apps/svelte.dev/content/docs/kit/25-build-and-deploy/70-adapter-cloudflare-workers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,20 @@ https://dash.cloudflare.com/<your-account-id>/home
6565
6666
You will need to install[Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/) and log in, if you haven't already:
6767

68-
```sh
68+
```bash
6969
npm i -D wrangler
7070
wrangler login
7171
```
7272

7373
Then, you can build your app and deploy it:
7474

75-
```sh
75+
```bash
7676
wrangler deploy
7777
```
7878

7979
##Runtime APIs
8080

81-
The[`env`](https://developers.cloudflare.com/workers/runtime-apis/fetch-event#parameters) object contains your project's[bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/), which consist of KV/DO namespaces, etc. It is passed to SvelteKit via the`platform` property, along with[`context`](https://developers.cloudflare.com/workers/runtime-apis/context/),[`caches`](https://developers.cloudflare.com/workers/runtime-apis/cache/), and[`cf`](https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties), meaning that you can access it in hooks and endpoints:
81+
The[`env`](https://developers.cloudflare.com/workers/runtime-apis/fetch-event#parameters) object contains your project's[bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/), which consist of KV/DO namespaces, etc. It is passed to SvelteKit via the`platform` property, along with[`ctx`](https://developers.cloudflare.com/workers/runtime-apis/context/),[`caches`](https://developers.cloudflare.com/workers/runtime-apis/cache/), and[`cf`](https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties), meaning that you can access it in hooks and endpoints:
8282

8383
```js
8484
// @errors: 7031

‎apps/svelte.dev/content/docs/kit/25-build-and-deploy/90-adapter-vercel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Set this string as an environment variable on Vercel by logging in and going to
132132

133133
To get this key known about for local development, you can use the[Vercel CLI](https://vercel.com/docs/cli/env) by running the`vercel env pull` command locally like so:
134134

135-
```sh
135+
```bash
136136
vercel env pull .env.development.local
137137
```
138138

‎apps/svelte.dev/content/docs/kit/30-advanced/70-packaging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ You can create so-called declaration maps (`d.ts.map` files) by setting `"declar
250250

251251
To publish the generated package:
252252

253-
```sh
253+
```bash
254254
npm publish
255255
```
256256

‎apps/svelte.dev/content/docs/kit/60-appendix/10-faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,14 @@ Currently ESM Support within the latest Yarn (version 3) is considered [experime
196196

197197
The below seems to work although your results may vary. First create a new application:
198198

199-
```sh
199+
```bash
200200
yarn create svelte myapp
201201
cd myapp
202202
```
203203

204204
And enable Yarn Berry:
205205

206-
```sh
206+
```bash
207207
yarnset version berry
208208
yarn install
209209
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp