-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ken Howard
committed
Nov 21, 2018
1 parent
de05bd8
commit 4db0d27
Showing
8 changed files
with
5,615 additions
and
698 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
testMatch: ['**/__tests__/**/(*.)+(spec|test).ts?(x)'] | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,86 @@ | ||
{ | ||
"name": "vscode-gist", | ||
"displayName": "Gist Extension", | ||
"description": "Create, open and edit Gists", | ||
"version": "1.2.1", | ||
"publisher": "kenhowardpdx", | ||
"repository": "https://github.com/kenhowardpdx/vscode-gist", | ||
"engines": { | ||
"vscode": "^1.28.0" | ||
}, | ||
"categories": [ | ||
"Other" | ||
], | ||
"activationEvents": [ | ||
"onCommand:extension.openCodeBlock", | ||
"onCommand:extension.openFavoriteCodeBlock", | ||
"onCommand:extension.createCodeBlock", | ||
"onCommand:extension.openCodeBlockInBrowser", | ||
"onCommand:extension.deleteCodeBlock", | ||
"onCommand:extension.removeFileFromCodeBlock", | ||
"onCommand:extension.addToCodeBlock", | ||
"onCommand:extension.changeCodeBlockDescription", | ||
"onCommand:extension.insertCode" | ||
], | ||
"main": "./out/extension", | ||
"contributes": { | ||
"commands": [ | ||
{ | ||
"command": "extension.openCodeBlock", | ||
"title": "GIST: Open Block" | ||
}, | ||
{ | ||
"command": "extension.openFavoriteCodeBlock", | ||
"title": "GIST: Open Favorite Block" | ||
}, | ||
{ | ||
"command": "extension.createCodeBlock", | ||
"title": "GIST: Create New Block" | ||
}, | ||
{ | ||
"command": "extension.openCodeBlockInBrowser", | ||
"title": "GIST: Open Block In Browser" | ||
}, | ||
{ | ||
"command": "extension.deleteCodeBlock", | ||
"title": "GIST: Delete Block" | ||
}, | ||
{ | ||
"command": "extension.removeFileFromCodeBlock", | ||
"title": "GIST: Remove From Block" | ||
}, | ||
{ | ||
"command": "extension.addToCodeBlock", | ||
"title": "GIST: Add To Block" | ||
}, | ||
{ | ||
"command": "extension.changeCodeBlockDescription", | ||
"title": "GIST: Change Block Description" | ||
}, | ||
{ | ||
"command": "extension.insertCode", | ||
"title": "GIST: Insert Code Into Current File" | ||
} | ||
] | ||
}, | ||
"scripts": { | ||
"compile": "tsc -p ./", | ||
"lint": "tslint -p ./", | ||
"postinstall": "node ./node_modules/vscode/bin/install", | ||
"test": "npm run compile && node ./node_modules/vscode/bin/test", | ||
"vscode:prepublish": "npm run compile", | ||
"watch": "tsc -watch -p ./" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^3.1.6", | ||
"vscode": "^1.1.21", | ||
"tslint": "^5.11.0", | ||
"@types/node": "^8.10.25", | ||
"@types/mocha": "^2.2.42" | ||
} | ||
"name": "vscode-gist", | ||
"displayName": "Gist Extension", | ||
"description": "Create, open and edit Gists", | ||
"version": "1.2.1", | ||
"publisher": "kenhowardpdx", | ||
"repository": "https://github.com/kenhowardpdx/vscode-gist", | ||
"engines": { | ||
"vscode": "^1.28.0" | ||
}, | ||
"categories": [ | ||
"Other" | ||
], | ||
"activationEvents": [ | ||
"onCommand:extension.openCodeBlock", | ||
"onCommand:extension.openFavoriteCodeBlock", | ||
"onCommand:extension.createCodeBlock", | ||
"onCommand:extension.openCodeBlockInBrowser", | ||
"onCommand:extension.deleteCodeBlock", | ||
"onCommand:extension.removeFileFromCodeBlock", | ||
"onCommand:extension.addToCodeBlock", | ||
"onCommand:extension.changeCodeBlockDescription", | ||
"onCommand:extension.insertCode" | ||
], | ||
"main": "./out/extension", | ||
"contributes": { | ||
"commands": [ | ||
{ | ||
"command": "extension.openCodeBlock", | ||
"title": "GIST: Open Block" | ||
}, | ||
{ | ||
"command": "extension.openFavoriteCodeBlock", | ||
"title": "GIST: Open Favorite Block" | ||
}, | ||
{ | ||
"command": "extension.createCodeBlock", | ||
"title": "GIST: Create New Block" | ||
}, | ||
{ | ||
"command": "extension.openCodeBlockInBrowser", | ||
"title": "GIST: Open Block In Browser" | ||
}, | ||
{ | ||
"command": "extension.deleteCodeBlock", | ||
"title": "GIST: Delete Block" | ||
}, | ||
{ | ||
"command": "extension.removeFileFromCodeBlock", | ||
"title": "GIST: Remove From Block" | ||
}, | ||
{ | ||
"command": "extension.addToCodeBlock", | ||
"title": "GIST: Add To Block" | ||
}, | ||
{ | ||
"command": "extension.changeCodeBlockDescription", | ||
"title": "GIST: Change Block Description" | ||
}, | ||
{ | ||
"command": "extension.insertCode", | ||
"title": "GIST: Insert Code Into Current File" | ||
} | ||
] | ||
}, | ||
"scripts": { | ||
"compile": "tsc -p ./", | ||
"lint": "tslint -p ./", | ||
"postinstall": "node ./node_modules/vscode/bin/install", | ||
"test:unit": "jest", | ||
"test:integration": "npm run compile && node ./node_modules/vscode/bin/test", | ||
"test": "npm run test:unit && npm run test:integration", | ||
"vscode:prepublish": "npm run compile", | ||
"watch": "tsc -watch -p ./" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^23.3.9", | ||
"@types/mocha": "^2.2.42", | ||
"@types/node": "^8.10.25", | ||
"jest": "^23.6.0", | ||
"ts-jest": "^23.10.4", | ||
"tslint": "^5.11.0", | ||
"typescript": "^3.1.6", | ||
"vscode": "^1.1.21" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,69 @@ | ||
'use strict'; | ||
// The module 'vscode' contains the VS Code extensibility API | ||
// Import the module and reference it with the alias vscode in your code below | ||
import * as vscode from 'vscode'; | ||
|
||
// this method is called when your extension is activated | ||
// your extension is activated the very first time the command is executed | ||
export function activate(context: vscode.ExtensionContext): void { | ||
// Use the console to output diagnostic information (console.log) and errors (console.error) | ||
// This line of code will only be executed once when your extension is activated | ||
// tslint:disable-next-line:no-console | ||
console.log('Congratulations, your extension "vscode-gist" is now active!'); | ||
import { Levels, Logger } from './logger'; | ||
|
||
// The command has been defined in the package.json file | ||
// Now provide the implementation of the command with registerCommand | ||
// The commandId parameter must match the command field in package.json | ||
const disposable = vscode.commands.registerCommand( | ||
'extension.sayHello', | ||
() => { | ||
// The code you place here will be executed every time your command is executed | ||
export function activate(_: vscode.ExtensionContext): void { | ||
const logger = new Logger(Levels.DEBUG); | ||
|
||
// Display a message box to the user | ||
vscode.window.showInformationMessage('Hello World!'); | ||
logger.debug('extension activated'); | ||
vscode.commands.registerCommand( | ||
'extension.openCodeBlock', | ||
(): void => { | ||
// intentionally left blank | ||
} | ||
); | ||
vscode.commands.registerCommand( | ||
'extension.openFavoriteCodeBlock', | ||
(): void => { | ||
// intentionally left blank | ||
} | ||
); | ||
vscode.commands.registerCommand( | ||
'extension.createCodeBlock', | ||
(): void => { | ||
// intentionally left blank | ||
} | ||
); | ||
vscode.commands.registerCommand( | ||
'extension.openCodeBlockInBrowser', | ||
(): void => { | ||
// intentionally left blank | ||
} | ||
); | ||
vscode.commands.registerCommand( | ||
'extension.deleteCodeBlock', | ||
(): void => { | ||
// intentionally left blank | ||
} | ||
); | ||
vscode.commands.registerCommand( | ||
'extension.removeFileFromCodeBlock', | ||
(): void => { | ||
// intentionally left blank | ||
} | ||
); | ||
vscode.commands.registerCommand( | ||
'extension.addToCodeBlock', | ||
(): void => { | ||
// intentionally left blank | ||
} | ||
); | ||
vscode.commands.registerCommand( | ||
'extension.changeCodeBlockDescription', | ||
(): void => { | ||
// intentionally left blank | ||
} | ||
); | ||
vscode.commands.registerCommand( | ||
'extension.insertCode', | ||
(): void => { | ||
// intentionally left blank | ||
} | ||
); | ||
|
||
context.subscriptions.push(disposable); | ||
// context.subscriptions.push(disposable); | ||
} | ||
|
||
// this method is called when your extension is deactivated | ||
export function deactivate(): void { | ||
// intentionally left blank | ||
} |
Oops, something went wrong.