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: docs/tutorialkit.dev/src/content/docs/reference/configuration.mdx
+31-2
Original file line number
Diff line number
Diff line change
@@ -260,6 +260,35 @@ type Command = string
260
260
261
261
```
262
262
263
+
##### `filesystem`
264
+
Configures how changes such as files being modified or added in WebContainer should be reflected in the editor when they weren't caused by the user directly. By default, the editor will not reflect these changes.
265
+
266
+
An example use case is when a user runs a command that modifies a file. For instance when a `package.json` is modified by doing an `npm install <xyz>`. If `watch` is set to `true`, the file will be updated in the editor. If set to `false`, the file will not be updated.
267
+
268
+
This property is by default set to `false` as it can impact performance. If you are creating a lesson where the user is expected to modify files outside the editor, you may want to keep this to `false`.
269
+
270
+
<PropertyTable inherited type={'FileSystem'} />
271
+
272
+
The `FileSystem` type has the following shape:
273
+
274
+
```ts
275
+
type FileSystem = {
276
+
watch: boolean
277
+
}
278
+
279
+
```
280
+
281
+
Example values:
282
+
283
+
```yaml
284
+
filesystem:
285
+
watch: true # Filesystem changes are reflected in the editor
286
+
287
+
filesystem:
288
+
watch: false # Or if it's omitted, the default value is false
289
+
```
290
+
291
+
263
292
##### `terminal`
264
293
Configures one or more terminals. TutorialKit provides two types of terminals: read-only, called `output`, and interactive, called `terminal`. Note, that there can be only one `output` terminal.
265
294
@@ -319,7 +348,7 @@ Navigating to a lesson that specifies `autoReload` will always reload the previe
319
348
Specifies which folder from the `src/templates/` directory should be used as the basis for the code. See the "[Code templates](/guides/creating-content/#code-templates)" guide for a detailed explainer.
320
349
<PropertyTable inherited type="string" />
321
350
322
-
#### `editPageLink`
351
+
##### `editPageLink`
323
352
Display a link in lesson for editing the page content.
324
353
The value is a URL pattern where `${path}` is replaced with the lesson's location relative to the `src/content/tutorial`.
325
354
@@ -346,7 +375,7 @@ You can instruct Github to show the source code instead by adding `plain=1` quer
346
375
347
376
:::
348
377
349
-
### `openInStackBlitz`
378
+
##### `openInStackBlitz`
350
379
Display a link for opening current lesson in StackBlitz.
Copy file name to clipboardExpand all lines: packages/runtime/README.md
+2-3
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,9 @@ A wrapper around the **[WebContainer API][webcontainer-api]** focused on providi
4
4
5
5
The runtime exposes the following:
6
6
7
-
-`lessonFilesFetcher`: A singleton that lets you fetch the contents of the lesson files
8
-
-`TutorialRunner`: The API to manage your tutorial content in WebContainer
7
+
-`TutorialStore`: A store to manage your tutorial content in WebContainer and in your components.
9
8
10
-
Only a single instance of `TutorialRunner` should be created in your application and its lifetime is bound by the lifetime of the WebContainer instance.
9
+
Only a single instance of `TutorialStore` should be created in your application and its lifetime is bound by the lifetime of the WebContainer instance.
0 commit comments