Skip to content

Commit

Permalink
feat: add separate runtime icon to the title bar, remove default runt…
Browse files Browse the repository at this point in the history
…ime config
  • Loading branch information
ambar committed Apr 6, 2024
1 parent d574da1 commit abcc077
Show file tree
Hide file tree
Showing 10 changed files with 196 additions and 143 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ Open _Command Palette_, choose `Live Code: Open Preview to the Side`, or simply

```json
{
"liveCode.defaultPlatform": {
"type": "string",
"default": "browser",
"description": "Set the execution environment of the preview",
"enum": ["browser", "node"]
},
"liveCode.renderJSX": {
"type": "boolean",
"default": true,
Expand Down
1 change: 1 addition & 0 deletions images/browser-plain.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/browser.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion images/electron.svg

This file was deleted.

4 changes: 4 additions & 0 deletions images/logo-plain.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/node-plain.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 37 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,69 @@
"contributes": {
"commands": [
{
"command": "liveCode.openPreviewToSide",
"title": "Open Preview to the Side",
"command": "liveCode.choosePreviewToTheSide",
"title": "Choose A Runtime Preview to the Side",
"category": "Live Code",
"icon": "images/logo.svg"
"icon": "images/logo-plain.svg"
},
{
"command": "liveCode.changePlatform",
"title": "Change Platform",
"command": "liveCode.openBrowserPreviewToSide",
"title": "Open Browser Preview to the Side",
"category": "Live Code",
"icon": "$(notebook-kernel-select)"
"icon": "images/browser-plain.svg"
},
{
"command": "liveCode.openNodePreviewToSide",
"title": "Open Node.js Preview to the Side",
"category": "Live Code",
"icon": "images/node-plain.svg"
},
{
"command": "liveCode.changeCurrentRuntimeOfPreview",
"title": "Change Current Runtime of Preview",
"category": "Live Code",
"icon": "images/logo-plain.svg"
}
],
"menus": {
"editor/context": [
{
"command": "liveCode.openPreviewToSide",
"command": "liveCode.openBrowserPreviewToSide",
"when": "editorLangId in liveCode.supportedLanguageIds",
"group": "liveCode"
},
{
"command": "liveCode.openNodePreviewToSide",
"when": "editorLangId in liveCode.supportedLanguageIds",
"group": "liveCode"
}
],
"editor/title": [
{
"command": "liveCode.openPreviewToSide",
"command": "liveCode.openBrowserPreviewToSide",
"when": "editorLangId in liveCode.supportedLanguageIds",
"group": "navigation"
},
{
"command": "liveCode.changePlatform",
"command": "liveCode.openNodePreviewToSide",
"when": "editorLangId in liveCode.supportedLanguageIds",
"group": "navigation"
},
{
"command": "liveCode.choosePreviewToTheSide",
"when": "editorLangId in liveCode.supportedLanguageIds",
"group": "navigation"
},
{
"command": "liveCode.changeCurrentRuntimeOfPreview",
"when": "liveCode.isPreviewFocus",
"group": "navigation"
}
]
},
"keybindings": [
{
"command": "liveCode.openPreviewToSide",
"command": "liveCode.choosePreviewToTheSide",
"key": "ctrl+k l",
"mac": "cmd+k l",
"when": "editorLangId in liveCode.supportedLanguageIds && !liveCode.isPreviewFocus"
Expand All @@ -72,19 +99,6 @@
"type": "object",
"title": "Live Code",
"properties": {
"liveCode.defaultPlatform": {
"type": "string",
"default": "browser",
"description": "Set the execution environment for the preview",
"enum": [
"browser",
"node"
],
"enumDescriptions": [
"Execute code in web browser",
"Execute code in Node.js"
]
},
"liveCode.renderJSX": {
"type": "boolean",
"default": true,
Expand Down
Loading

0 comments on commit abcc077

Please sign in to comment.