mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-21 23:14:49 +01:00
fix: correctly declare extension
This commit is contained in:
parent
9584707982
commit
e2176fd1fc
2 changed files with 15 additions and 14 deletions
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "codemp-vscode",
|
||||
"name": "codemp",
|
||||
"version": "0.0.1",
|
||||
"description": "VSCode extension for CodeMP",
|
||||
"main": "index.node",
|
||||
"main": "./out/extension.js",
|
||||
"engines": {
|
||||
"vscode": "^1.32.0"
|
||||
},
|
||||
|
@ -17,12 +17,12 @@
|
|||
"contributes": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "example.helloWorld",
|
||||
"title": "Hello World"
|
||||
"command": "codemp.connect",
|
||||
"title": "Connect"
|
||||
}
|
||||
]
|
||||
},
|
||||
"activationEvents": [
|
||||
"onCommand:example.helloWorld"
|
||||
"onCommand:codemp.connect"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
const vscode = require("vscode");
|
||||
const codemp = require("./codemp.node");
|
||||
|
||||
module.exports = {
|
||||
activate,
|
||||
deactivate,
|
||||
};
|
||||
var CLIENT = null
|
||||
|
||||
function activate(context) {
|
||||
async function activate(context) {
|
||||
// This must match the command property in the package.json
|
||||
const commandID = "codemp.connect";
|
||||
let disposable = vscode.commands.registerCommand(commandID, sayHello);
|
||||
let disposable = vscode.commands.registerCommand(commandID, connect);
|
||||
context.subscriptions.push(disposable);
|
||||
}
|
||||
|
||||
function connect() {
|
||||
vscode.window.showInformationMessage("Connecting to CodeMP!");
|
||||
async function connect() {
|
||||
CLIENT = await codemp.connect("http://fantabos.co:50051")
|
||||
vscode.window.showInformationMessage("Connected to CodeMP!");
|
||||
}
|
||||
|
||||
function deactivate() {}
|
||||
module.exports = {
|
||||
activate,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue