Skip to content

Commit 025785c

Browse files
authored
Merge pull request #38 from tomoam/update-up-to-20230408
2023/04/08 迄の更新に追従
2 parents 59937ef + a6e6b20 commit 025785c

File tree

151 files changed

+1775
-1545
lines changed

Some content is hidden

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

151 files changed

+1775
-1545
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@ A soup-to-nuts interactive tutorial on how to build apps with Svelte.
66

77
This repo uses [pnpm](https://pnpm.io/).
88

9-
## Running the app
9+
## Developing the app
1010

11-
First, run `node scripts/create-common-bundle`. This packages up everything that's needed to run a SvelteKit app (Vite, Esbuild, SvelteKit, Svelte compiler etc) which can subsequently be unpacked on a server to create and run and instance of a SvelteKit application (which powers the output window of the tutorial).
11+
First, run `node scripts/create-common-bundle`. This packages up everything that's needed to run a SvelteKit app (Vite, Esbuild, SvelteKit, Svelte compiler etc) which can subsequently be unpacked on a server to create and run and instance of a SvelteKit application (which powers the output window of the tutorial). Then, run `dev`:
1212

13-
The next steps depend on whether you want to run this locally in filesystem mode, or in WebContainer mode. For now, it works with filesystem mode only locally. In future, it will run both locally and on the web (using [WebContainers](https://blog.stackblitz.com/posts/introducing-webcontainers/)).
13+
```bash
14+
node scripts/create-common-bundle
15+
pnpm dev
16+
```
1417

15-
### Local/filesystem mode
18+
To build for production and run locally:
1619

17-
1. add an `.env` file with `PUBLIC_USE_FILESYSTEM=true` in it
18-
2. Run the app locally with `pnpm dev` or `pnpm build && pnpm preview`.
19-
20-
### WebContainer mode
21-
22-
1. if an `.env` file exists, modify it so there's `PUBLIC_USE_FILESYSTEM=` in it
23-
2. Run the app locally with `pnpm dev` or `pnpm build && pnpm preview`.
20+
```bash
21+
pnpm build
22+
pnpm preview
23+
```
2424

2525
## Creating new tutorials
2626

2727
Tutorials live inside `content`. Each tutorial consists of a `README.md`, which is the text to the left, and `app-a` and `app-b` folders, which represent the initial and solved state. Files that stay the same can be omitted from `app-b`. Files are marked as deleted in `app-b` if they start with `__delete`. Folders that are marked as deleted in `app-b` if they contain a file named `__delete`.
2828

2929
## Bumping tutorial dependencies
3030

31-
Bump the dependency (for example Svelte) in both the root and the `content/common` `package.json`. In the root do `pnpm i` (to update `pnpm-lock.yaml`), in `content/common` do `npm i` (to update `package-lock.json`). After deployment things might be out of date because Vercel caches things, redeploy without cache in that case.
31+
Bump the dependency (for example Svelte) in both the root and the `content/common` `package.json`. In the root do `pnpm i` (to update `pnpm-lock.yaml`), in `content/common` do `npm i` (to update `package-lock.json`).

backend/+server.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

backend/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

backend/[id]/+server.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

backend/apps.js

Lines changed: 0 additions & 208 deletions
This file was deleted.

backend/destroy/+server.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

backend/ws.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

content/tutorial/02-advanced-svelte/05-bindings/03-media-elements/app-a/src/lib/tracks.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
export const tracks = [
22
{
33
// https://musopen.org/music/9862-the-blue-danube-op-314/
4-
src: 'https://learn.svelte.dev/assets/media/music/strauss.mp3',
4+
src: 'https://learn.svelte.jp/assets/media/music/strauss.mp3',
55
title: 'The Blue Danube Waltz',
66
artist: 'Johann Strauss'
77
},
88

99
{
1010
// https://musopen.org/music/43775-the-planets-op-32/
11-
src: 'https://learn.svelte.dev/assets/media/music/holst.mp3',
11+
src: 'https://learn.svelte.jp/assets/media/music/holst.mp3',
1212
title: 'Mars, the Bringer of War',
1313
artist: 'Gustav Holst'
1414
},
1515

1616
{
1717
// https://musopen.org/music/8010-3-gymnopedies/
18-
src: 'https://learn.svelte.dev/assets/media/music/satie.mp3',
18+
src: 'https://learn.svelte.jp/assets/media/music/satie.mp3',
1919
title: 'Gymnopédie no. 1',
2020
artist: 'Erik Satie'
2121
},
2222

2323
{
2424
// https://musopen.org/music/43683-requiem-in-d-minor-k-626/
25-
src: 'https://learn.svelte.dev/assets/media/music/mozart.mp3',
25+
src: 'https://learn.svelte.jp/assets/media/music/mozart.mp3',
2626
title: 'Requiem in D minor, K. 626 - III. Sequence - Lacrymosa',
2727
artist: 'Wolfgang Amadeus Mozart'
2828
}

content/tutorial/02-advanced-svelte/07-composition/01-slots/app-a/src/lib/Card.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
font-family: 'Silian Rail';
2020
width: 24em;
2121
aspect-ratio: 3.5 / 2.0;
22-
background: url(./paper.svg);
22+
background: url(./paper.svg) no-repeat 50% 50%;
23+
background-size: cover;
2324
border-radius: 2px;
2425
filter: drop-shadow(0.1em 0.1em 0.1em rgba(0, 0, 0, 0.2));
2526
padding: 1.5em 1em 1em 1em;

content/tutorial/02-advanced-svelte/07-composition/01-slots/app-b/src/lib/Card.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
font-family: 'Silian Rail';
2020
width: 24em;
2121
aspect-ratio: 3.5 / 2.0;
22-
background: url(./paper.svg);
22+
background: url(./paper.svg) no-repeat 50% 50%;
23+
background-size: cover;
2324
border-radius: 2px;
2425
filter: drop-shadow(0.1em 0.1em 0.1em rgba(0, 0, 0, 0.2));
2526
padding: 1.5em 1em 1em 1em;

0 commit comments

Comments
 (0)