@luozhu/create-vscode-webview
Version:
Create vscode extension with webview
21 lines (18 loc) • 587 B
text/typescript
import vscode from 'vscode';
import { createUmiWebviewPanel } from '@luozhu/vscode-utils';
let currentPanel: vscode.WebviewPanel | undefined;
export function activate(context: vscode.ExtensionContext) {
console.log('Congratulations, your extension "{{name}}" is now active!');
context.subscriptions.push(
vscode.commands.registerCommand('{{name}}.start', async () => {
currentPanel = createUmiWebviewPanel(
context,
'{{name}}',
'{{displayName}}',
'assets/icon.png',
'^3.5.17'
);
})
);
}
export function deactivate() {}