-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
2960ee7
commit e766076
Showing
5 changed files
with
109 additions
and
56 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 |
---|---|---|
@@ -1,30 +1,21 @@ | ||
/* eslint-env browser */ | ||
|
||
// 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) { | ||
// 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 | ||
console.log("Congratulations, your extension \"helloworld - web - sample\" is now active in the web extension host!"); | ||
|
||
// 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("helloworld-web-sample.helloWorld", () => { | ||
// The code you place here will be executed every time your command is executed | ||
|
||
// Display a message box to the user | ||
vscode.window.showInformationMessage("Hello World from helloworld-web-sample in a web extension host!"); | ||
}); | ||
|
||
context.subscriptions.push(disposable); | ||
} | ||
|
||
// This method is called when your extension is deactivated | ||
export function deactivate() { | ||
// Noop | ||
} | ||
import * as vscode from "vscode"; | ||
|
||
export function activate(context: vscode.ExtensionContext) { | ||
// 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 | ||
console.log("Congratulations, your extension \"helloworld-web-sample\" is now active in the web extension host!"); | ||
|
||
// 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("helloworld-web-sample.helloWorld", () => { | ||
// The code you place here will be executed every time your command is executed | ||
|
||
// Display a message box to the user | ||
vscode.window.showInformationMessage("Hello World from helloworld-web-sample in a web extension host!"); | ||
}); | ||
|
||
context.subscriptions.push(disposable); | ||
} | ||
|
||
export function deactivate() { } |
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"name": "helloworld-web-sample", | ||
"displayName": "helloworld-web-sample", | ||
"description": "HelloWorld example for VS Code in the browser", | ||
"version": "0.0.1", | ||
"publisher": "vscode-samples", | ||
"private": true, | ||
"license": "MIT", | ||
"repository": "https://github.com/microsoft/vscode-extension-samples/helloworld-web-sample", | ||
"engines": { | ||
"vscode": "^1.74.0" | ||
}, | ||
"categories": [ | ||
"Other" | ||
], | ||
"activationEvents": [], | ||
"browser": "./extension.js", | ||
"contributes": { | ||
"commands": [ | ||
{ | ||
"command": "helloworld-web-sample.helloWorld", | ||
"title": "Hello World" | ||
} | ||
] | ||
}, | ||
"scripts": { | ||
"test": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=.", | ||
"pretest": "npm run compile-web", | ||
"vscode:prepublish": "npm run package-web", | ||
"compile-web": "webpack", | ||
"watch-web": "webpack --watch", | ||
"package-web": "webpack --mode production --devtool hidden-source-map", | ||
"lint": "eslint src --ext ts" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "^9.0.0", | ||
"@types/vscode": "^1.73.0", | ||
"@types/webpack-env": "^1.16.2", | ||
"@typescript-eslint/eslint-plugin": "^5.42.0", | ||
"@typescript-eslint/parser": "^5.42.0", | ||
"@vscode/test-web": "^0.0.22", | ||
"assert": "^2.0.0", | ||
"eslint": "^8.26.0", | ||
"mocha": "^9.2.0", | ||
"process": "^0.11.10", | ||
"ts-loader": "^9.2.5", | ||
"typescript": "^5.1.3", | ||
"webpack": "^5.52.1", | ||
"webpack-cli": "^4.8.0" | ||
} | ||
} |
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
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