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: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Change Log
2
2
3
+
## [0.0.36] - 2025-12-09
4
+
5
+
-[#2](https://github.com/estruyf/vscode-demo-time/issues/2): Added the ability to have a `variables.json` file to store variables/constants that can be used in the demo steps
6
+
3
7
## [0.0.35] - 2025-12-09
4
8
5
9
- Added the `setSetting` action to update a setting value
Copy file name to clipboardExpand all lines: README.md
+54-20Lines changed: 54 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,17 +24,18 @@
24
24
25
25
Currently the extension supports the following features:
26
26
27
-
- Multiple demo files located in `.demo` folder
27
+
- Multiple demo files located in `.demo` folder.
28
28
- Support for code/snippet files in the `.demo` folder. These files can be referenced in the demo steps, instead of adding the code in the JSON file.
29
-
- Explorer panel to execute your demo steps
30
-
- Add new demo steps (execute the `Demo Time: Add as demo step` command)
31
-
- Run through the demo steps (execute the `Demo Time: Start` command)
32
-
- Presentation mode which allows you to use a clicker to navigate through the demo steps
33
-
- Run a specific demo step from a command execution with the `demo-time.runById` command
29
+
- Explorer panel to execute your demo steps.
30
+
- Add new demo steps (execute the `Demo Time: Add as demo step` command).
31
+
- Run through the demo steps (execute the `Demo Time: Start` command).
32
+
- Presentation mode which allows you to use a clicker to navigate through the demo steps.
33
+
- Run a specific demo step from a command execution with the `demo-time.runById` command.
34
+
- Place your variables in a `variables.json` file in the `.demo` folder. You can reference these variables like `{variable_name}` in your demo steps.
34
35
35
-
###Supported demo steps
36
+
## Supported demo step actions
36
37
37
-
####File actions
38
+
### File actions
38
39
39
40
<table>
40
41
<tr>
@@ -100,7 +101,7 @@ Currently the extension supports the following features:
100
101
</tr>
101
102
</table>
102
103
103
-
####Code actions
104
+
### Code actions
104
105
105
106
<table>
106
107
<tr>
@@ -212,7 +213,7 @@ Currently the extension supports the following features:
212
213
</tr>
213
214
</table>
214
215
215
-
####Setting actions
216
+
### Setting actions
216
217
217
218
<table>
218
219
<tr>
@@ -243,7 +244,7 @@ Currently the extension supports the following features:
243
244
</tr>
244
245
</table>
245
246
246
-
#####Setting update example
247
+
#### Setting update example
247
248
248
249
Here is an example of how you can hide the activity and status bar in Visual Studio Code.
249
250
@@ -283,7 +284,7 @@ To reset the settings, you can use the following steps:
283
284
}
284
285
```
285
286
286
-
####Time actions
287
+
### Time actions
287
288
288
289
<table>
289
290
<tr>
@@ -328,7 +329,7 @@ To reset the settings, you can use the following steps:
328
329
</tr>
329
330
</table>
330
331
331
-
#### VSCode actions
332
+
###VS Code actions
332
333
333
334
<table>
334
335
<tr>
@@ -376,7 +377,7 @@ To reset the settings, you can use the following steps:
376
377
</tr>
377
378
</table>
378
379
379
-
####Terminal actions
380
+
### Terminal actions
380
381
381
382
<table>
382
383
<tr>
@@ -404,7 +405,7 @@ To reset the settings, you can use the following steps:
404
405
</tr>
405
406
</table>
406
407
407
-
####Snippets
408
+
### Snippets
408
409
409
410
<table>
410
411
<tr>
@@ -436,7 +437,7 @@ To reset the settings, you can use the following steps:
436
437
</tr>
437
438
</table>
438
439
439
-
#####Snippet example
440
+
#### Snippet example
440
441
441
442
In the demo file, you can reference a snippet file. The snippet file can contain multiple steps which can be reused in multiple demos.
442
443
@@ -455,6 +456,8 @@ In the demo file, you can reference a snippet file. The snippet file can contain
455
456
456
457
> The `contentPath` property its value is relative to the `.demo` folder. So, in the example above, the snippet file is located in the `.demo/snippets` folder.
457
458
459
+
> In the `args` property, you can define the arguments/variables which you want to use in the snippet file. In the snippet file, you can reference these arguments with curly braces `{argument name}`.
460
+
458
461
In the `insert_and_highlight.json` file, you can define the steps you want to execute.
459
462
460
463
```json
@@ -481,6 +484,37 @@ In the `insert_and_highlight.json` file, you can define the steps you want to ex
481
484
482
485
To use the extension, you need to create a `.demo` folder in your workspace. Once created, you can add a JSON file which contains the demo and its steps.
You can define variables in a `variables.json` file in the `.demo` folder. You can reference these variables in your demo steps by using curly braces `{variable_name}`.
499
+
500
+
#### Example variables file
501
+
502
+
```json
503
+
{
504
+
"SLIDES_URL": "http://localhost:3030"
505
+
}
506
+
```
507
+
508
+
#### Example demo step
509
+
510
+
```json
511
+
{
512
+
"action": "executeVSCodeCommand",
513
+
"command": "simpleBrowser.show",
514
+
"args": "{SLIDES_URL}"
515
+
}
516
+
```
517
+
484
518
## Settings
485
519
486
520
| Setting | Description | Default |
@@ -491,9 +525,9 @@ To use the extension, you need to create a `.demo` folder in your workspace. Onc
491
525
|`demoTime.timer`| Count down timer for how long the session should last. If not set, it will not count down. The value is the number of minutes. |`null`|
492
526
|`demoTime.insertLineSpeed`| The speed in milliseconds for inserting lines. If you set it to `0`, it will insert its content immediately. |`25`|
493
527
494
-
###Tips
528
+
## Tips and tricks
495
529
496
-
####Position
530
+
### Position
497
531
498
532
For the position you can use the following formats:
499
533
@@ -503,7 +537,7 @@ For the position you can use the following formats:
503
537
-`start` will be replaced by the first line number
504
538
-`end` will be replaced by the last line number
505
539
506
-
####Adding content to a file
540
+
### Adding content to a file
507
541
508
542
When you want to insert content to a file, you can use the `content` or `contentPath` properties in the demo step.
509
543
@@ -512,7 +546,7 @@ When you want to insert content to a file, you can use the `content` or `content
512
546
|`content`| This property allows you to add the content directly in the JSON file, but this can make your JSON file quite big and it can be hard to read. |
513
547
|`contentPath`| This property allows you to reference a file in the `.demo` folder. This way you can keep your JSON file clean and add the content in separate files. **Important**: the path is relative to the `.demo` folder. |
0 commit comments