|
1 |
| -// The module 'vscode' contains the VS Code extensibility API |
2 |
| -// Import the module and reference it with the alias vscode in your code below |
3 | 1 | const vscode = require('vscode');
|
| 2 | +const Client = require('./lib/client.js'); |
4 | 3 |
|
5 |
| -// This method is called when your extension is activated |
6 |
| -// Your extension is activated the very first time the command is executed |
7 | 4 |
|
8 |
| -/** |
9 |
| - * @param {vscode.ExtensionContext} context |
10 |
| - */ |
11 | 5 | function activate(context) {
|
12 |
| - |
13 |
| - // Use the console to output diagnostic information (console.log) and errors (console.error) |
14 |
| - // This line of code will only be executed once when your extension is activated |
15 | 6 | console.log('Congratulations, your extension "htmlclasses-parser" is now active!');
|
16 | 7 |
|
17 |
| - // The command has been defined in the package.json file |
18 |
| - // Now provide the implementation of the command with registerCommand |
19 |
| - // The commandId parameter must match the command field in package.json |
20 | 8 | const disposable = vscode.commands.registerCommand('htmlclasses-parser.helloWorld', () => {
|
21 |
| - // The code you place here will be executed every time your command is executed |
22 |
| - |
23 |
| - // Display a message box to the user |
24 | 9 | vscode.window.showInformationMessage('Hello World from htmlClasses-parser!');
|
25 | 10 | });
|
26 | 11 |
|
27 |
| - context.subscriptions.push(disposable); |
| 12 | + const test = vscode.commands.registerCommand('htmlclasses-parser.test', () => { |
| 13 | + const window = vscode.window; |
| 14 | + const client = new Client(window); |
| 15 | + |
| 16 | + const classes = client.convert(); |
| 17 | + client.print(classes.toString()); |
| 18 | + }); |
| 19 | + context.subscriptions.push(disposable, test); |
28 | 20 | }
|
29 | 21 |
|
30 | 22 | // This method is called when your extension is deactivated
|
|
0 commit comments