Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:estruyf/vscode-demo-time into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Jan 8, 2025
2 parents d8c5430 + 5ed6e0f commit 959226b
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [0.0.51] - 2025-01-07

- Add open documentation action and link it to the editor title for JSON files

## [0.0.50] - 2025-01-06

- [#23](https://github.com/estruyf/vscode-demo-time/issues/23): Add the ability to add notes to demos
Expand Down
Binary file added assets/demo-time-logo.woff
Binary file not shown.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-demo-time",
"displayName": "Demo Time",
"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!",
"version": "0.0.50",
"version": "0.0.51",
"publisher": "eliostruyf",
"galleryBanner": {
"color": "#86836D",
Expand Down Expand Up @@ -82,6 +82,13 @@
"fontPath": "assets/demo-time-v1.woff",
"fontCharacter": "\\e900"
}
},
"dt-logo": {
"description": "Demo Time - logo",
"default": {
"fontPath": "assets/demo-time-logo.woff",
"fontCharacter": "\\e800"
}
}
},
"configuration": {
Expand Down Expand Up @@ -138,6 +145,12 @@
}
},
"commands": [
{
"command": "demo-time.docs",
"title": "Open Demo Time documentation",
"category": "Demo Time",
"icon": "$(dt-logo)"
},
{
"command": "demo-time.start",
"title": "Start",
Expand Down Expand Up @@ -333,6 +346,13 @@
"when": "view == demo-time && (viewItem =~ /demo-time.hasNotes/)",
"group": "inline@4"
}
],
"editor/title": [
{
"command": "demo-time.docs",
"when": "(editorLangId == jsonc || editorLangId == json) && resourceDirname =~ /\\.demo$/",
"group": "navigation@1"
}
]
},
"views": {
Expand Down
2 changes: 2 additions & 0 deletions src/constants/Command.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export const EXTENSION_NAME = "demo-time";

export const COMMAND = {
// Documentation
documentation: `${EXTENSION_NAME}.docs`,
// Running the demo
start: `${EXTENSION_NAME}.start`,
previous: `${EXTENSION_NAME}.previous`,
Expand Down
8 changes: 8 additions & 0 deletions src/services/DemoCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class DemoCreator {
public static registerCommands() {
const subscriptions: Subscription[] = Extension.getInstance().subscriptions;

subscriptions.push(commands.registerCommand(COMMAND.documentation, DemoCreator.documentation));
subscriptions.push(commands.registerCommand(COMMAND.initialize, DemoCreator.initialize));
subscriptions.push(commands.registerCommand(COMMAND.openDemoFile, DemoCreator.openFile));
subscriptions.push(commands.registerCommand(COMMAND.addToStep, DemoCreator.addToStep));
Expand All @@ -29,6 +30,13 @@ export class DemoCreator {
);
}

/**
* Opens the documentation page in the browser.
*/
private static documentation() {
commands.executeCommand("vscode.open", Uri.parse("https://demotime.elio.dev/getting-started/"));
}

/**
* Initializes the demo by getting the demo files, creating a file if none exists,
* and showing the text document. It also updates the demo panel and displays an
Expand Down

0 comments on commit 959226b

Please sign in to comment.