out/extension.js
// your extension is activated the very first time the command is executed
your extension is activated the very first time the command is executed
your extension is activated the very first time the command is executed
function activate(context) {
    console.log('Congratulations, your extension "string-template-expander" is now active!');
    const languageIds = {
        csharp: ['csharp'],
        javascript: ['javascript', 'javascriptreact', 'typescript', 'typescriptreact']
    };
    let disposable = vscode.commands.registerCommand('templateStringExpander.convertToTemplateString', () => {
        var ate = vscode.window.activeTextEditor;
        if (!ate)
            return;
        if (languageIds.csharp.includes(ate.document.languageId)) {
            convertCSStringToTemplate(ate).catch(err => {
                throw err;
            });
        }
        else if (languageIds.javascript.includes(ate.document.languageId)) {
            convertJavascriptStringToTemplate(ate).catch(err => {
                throw err;
            });
        }
    });
    context.subscriptions.push(disposable);
}
function activate ( context ) { console . log ( 'Congratulations, your extension "string-template-expander" is now active!' ) ; const languageIds = { csharp : [ 'csharp' ] , javascript : [ 'javascript' , 'javascriptreact' , 'typescript' , 'typescriptreact' ] } ; let disposable = vscode . commands . registerCommand ( 'templateStringExpander.convertToTemplateString' , ( ) => { var ate = vscode . window . activeTextEditor ; if ( ! ate ) return ; if ( languageIds . csharp . includes ( ate . document . languageId ) ) { convertCSStringToTemplate ( ate ) . catch ( err => { throw err ; } ) ; } else if ( languageIds . javascript . includes ( ate . document . languageId ) ) { convertJavascriptStringToTemplate ( ate ) . catch ( err => { throw err ; } ) ; } } ) ; context . subscriptions . push ( disposable ) ; }
your extension is activated the very first time the command is executed
your extension is activated the very first time the command is executed
// Use the console to output diagnostic information (console.log) and errors (console.error) // This line of code will only be executed once when your extension is activated // The command has been defined in the package.json file // Now provide the implementation of the command with  registerCommand // The commandId parameter must match the command field in package.json // Display a message box to the user // vscode.window.showInformationMessage('Hello World!');