Skip to content

Commit 959226b

Browse files
committed
Merge branch 'dev' of github.com:estruyf/vscode-demo-time into dev
2 parents d8c5430 + 5ed6e0f commit 959226b

File tree

6 files changed

+37
-3
lines changed

6 files changed

+37
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## [0.0.51] - 2025-01-07
4+
5+
- Add open documentation action and link it to the editor title for JSON files
6+
37
## [0.0.50] - 2025-01-06
48

59
- [#23](https://github.com/estruyf/vscode-demo-time/issues/23): Add the ability to add notes to demos

assets/demo-time-logo.woff

1.5 KB
Binary file not shown.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-demo-time",
33
"displayName": "Demo Time",
44
"description": "Script your coding demos to perfection with this VS Code extension – no typos, no missteps, just flawless, stress-free presentations every time. Execute each demo step seamlessly, just like advancing through a slide presentation!",
5-
"version": "0.0.50",
5+
"version": "0.0.51",
66
"publisher": "eliostruyf",
77
"galleryBanner": {
88
"color": "#86836D",
@@ -82,6 +82,13 @@
8282
"fontPath": "assets/demo-time-v1.woff",
8383
"fontCharacter": "\\e900"
8484
}
85+
},
86+
"dt-logo": {
87+
"description": "Demo Time - logo",
88+
"default": {
89+
"fontPath": "assets/demo-time-logo.woff",
90+
"fontCharacter": "\\e800"
91+
}
8592
}
8693
},
8794
"configuration": {
@@ -138,6 +145,12 @@
138145
}
139146
},
140147
"commands": [
148+
{
149+
"command": "demo-time.docs",
150+
"title": "Open Demo Time documentation",
151+
"category": "Demo Time",
152+
"icon": "$(dt-logo)"
153+
},
141154
{
142155
"command": "demo-time.start",
143156
"title": "Start",
@@ -333,6 +346,13 @@
333346
"when": "view == demo-time && (viewItem =~ /demo-time.hasNotes/)",
334347
"group": "inline@4"
335348
}
349+
],
350+
"editor/title": [
351+
{
352+
"command": "demo-time.docs",
353+
"when": "(editorLangId == jsonc || editorLangId == json) && resourceDirname =~ /\\.demo$/",
354+
"group": "navigation@1"
355+
}
336356
]
337357
},
338358
"views": {

src/constants/Command.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
export const EXTENSION_NAME = "demo-time";
22

33
export const COMMAND = {
4+
// Documentation
5+
documentation: `${EXTENSION_NAME}.docs`,
46
// Running the demo
57
start: `${EXTENSION_NAME}.start`,
68
previous: `${EXTENSION_NAME}.previous`,

src/services/DemoCreator.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export class DemoCreator {
1515
public static registerCommands() {
1616
const subscriptions: Subscription[] = Extension.getInstance().subscriptions;
1717

18+
subscriptions.push(commands.registerCommand(COMMAND.documentation, DemoCreator.documentation));
1819
subscriptions.push(commands.registerCommand(COMMAND.initialize, DemoCreator.initialize));
1920
subscriptions.push(commands.registerCommand(COMMAND.openDemoFile, DemoCreator.openFile));
2021
subscriptions.push(commands.registerCommand(COMMAND.addToStep, DemoCreator.addToStep));
@@ -29,6 +30,13 @@ export class DemoCreator {
2930
);
3031
}
3132

33+
/**
34+
* Opens the documentation page in the browser.
35+
*/
36+
private static documentation() {
37+
commands.executeCommand("vscode.open", Uri.parse("https://demotime.elio.dev/getting-started/"));
38+
}
39+
3240
/**
3341
* Initializes the demo by getting the demo files, creating a file if none exists,
3442
* and showing the text document. It also updates the demo panel and displays an

0 commit comments

Comments
 (0)