-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathextension.js
26 lines (22 loc) · 850 Bytes
/
extension.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
var vscode = require('vscode');
var Deploy = require('./src/deploy');
var deploy;
// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
function activate(context) {
deploy = new Deploy();
var reload = vscode.workspace.onDidChangeConfiguration(deploy.reloadCfg);
var save = vscode.workspace.onDidSaveTextDocument(deploy.syncToRemote);
context.subscriptions.push(reload);
context.subscriptions.push(save);
}
exports.activate = activate;
// this method is called when your extension is deactivated
function deactivate() {
if (deploy) {
deploy.deactivate();
}
}
exports.deactivate = deactivate;