-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathextension.js
40 lines (31 loc) · 1.34 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const vscode = require('vscode');
const { getExtensionList, installExtensionList } = require('./utils');
const dummyExtensionList = require('./resources/dummyExtensionList.json');
/** @param {vscode.ExtensionContext} context */
function activate(context) {
console.log('auto-extension-installer is initialized!');
let disposable = vscode.commands.registerCommand('auto-extension-installer.helloWorld', () => {
vscode.window.showInformationMessage('Hello World from Auto extension installer!');
});
let exportExtensions = vscode.commands.registerCommand('auto-extension-installer.exportExtensions', () => {
console.log("Exporting extensions");
vscode.window.showInformationMessage('Exporting extensions');
const extensionList = getExtensionList(context);
console.log("Exported extensions:");
console.log(extensionList);
vscode.window.showInformationMessage('Exported extensions');
});
const installExtensions = vscode.commands.registerCommand('auto-extension-installer.installExtensions', () => {
console.log(dummyExtensionList.extensionList)
console.log("Here");
installExtensionList(context, dummyExtensionList.extensionList);
});
context.subscriptions.push(disposable, exportExtensions, installExtensions);
}
function deactivate() {
console.log('Exiting auto-extension-installer :(');
}
module.exports = {
activate,
deactivate
}