Skip to content

Commit

Permalink
added keybinding
Browse files Browse the repository at this point in the history
  • Loading branch information
Newton Fernandis committed Aug 29, 2023
1 parent 7d8cfe1 commit 120ebd1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
"activationEvents": [],
"main": "./out/extension.js",
"contributes": {
"keybindings": [
{
"command": "scripty.showScripts",
"key": "ctrl+shift+k",
"mac": "cmd+shift+k",
"when": "editorTextFocus"
}
],
"commands": [
{
"command": "scripty.showScripts",
Expand Down
3 changes: 1 addition & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function readPackageJsonScripts(): Array<Scripts> {
const packageJson = JSON.parse(packageJsonData)
const scripts = packageJson.scripts || {}

const result: Scripts[] = Object.entries(scripts).map(([name, script]) => ({
const result = Object.entries(scripts).map(([name, script]) => ({
name,
script,
})) as Scripts[]
Expand Down Expand Up @@ -71,5 +71,4 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(disposable)
}

// This method is called when your extension is deactivated
export function deactivate() {}

0 comments on commit 120ebd1

Please sign in to comment.