Skip to content

Commit ffa57ef

Browse files
committed
docs: document filesystem watch globs
1 parent c79bafe commit ffa57ef

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/tutorialkit.dev/src/content/docs/reference/configuration.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,15 @@ An example use case is when a user runs a command that modifies a file. For inst
284284

285285
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`.
286286

287+
If you would like files to be added or removed from the editor automatically, you need to specify an array of globs that will determine which folders and files to watch for changes.
288+
287289
<PropertyTable inherited type={'FileSystem'} />
288290

289291
The `FileSystem` type has the following shape:
290292

291293
```ts
292294
type FileSystem = {
293-
watch: boolean
295+
watch: boolean | string[]
294296
}
295297
296298
```
@@ -299,10 +301,13 @@ Example values:
299301

300302
```yaml
301303
filesystem:
302-
watch: true # Filesystem changes are reflected in the editor
304+
watch: true # Filesystem changes to files already in the editor are reflected in the editor
303305
304306
filesystem:
305307
watch: false # Or if it's omitted, the default value is false
308+
309+
filesystem:
310+
watch: ['/*.json', '/src/**/*'] # Files changed, added or deleted that match one of the globs are updated in the editor
306311
```
307312

308313

0 commit comments

Comments
 (0)