You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -6,26 +6,26 @@ A soup-to-nuts interactive tutorial on how to build apps with Svelte.
6
6
7
7
This repo uses [pnpm](https://pnpm.io/).
8
8
9
-
## Running the app
9
+
## Developing the app
10
10
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`:
12
12
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
+
```
14
17
15
-
### Local/filesystem mode
18
+
To build for production and run locally:
16
19
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
+
```
24
24
25
25
## Creating new tutorials
26
26
27
27
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`.
28
28
29
29
## Bumping tutorial dependencies
30
30
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`).
0 commit comments