Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added media/favicon.ico
Binary file not shown.
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@
"name": "Test"
}
]
}
},
"viewsWelcome": [
{
"view": "metrics-file",
"contents": "View tree to see where improvements can be made!\n[View Tree](command:myExtension.showPanel)\n"
}
]
},
"scripts": {
"lint": "eslint .",
Expand Down
6 changes: 4 additions & 2 deletions src/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ function createPanel(context) {
// create one new tab
vscode.ViewColumn.One,
{
enableScripts: true
enableScripts: true,
retainContextWhenHidden: true
}
);

panel.iconPath = vscode.Uri.joinPath(context.extensionUri, 'media', 'favicon.ico');

const bundlePath = vscode.Uri.joinPath(context.extensionUri, 'build', 'bundle.js');

// set webview URI to pass into html script
const bundleURI = panel.webview.asWebviewUri(bundlePath);


// render html of webview here
panel.webview.html = createWebviewHTML(bundleURI);
}
Expand Down