This is an sample extension that illustrates the use of virtual documents or TextDocumentContentProviders together with the vscode.previewHtml
command.
The purpose of the extension is to show stack analysis report. To play with the extension:
- Open a manifest file i.e (
requirements.txt,pom.xml,package.json) - Use command
Show fabric8-analytics stack reportto view stack analysis report on one manifest file - Use command
Show fabric8-analytics stack report on Workspaceto view stack analysis report on entire workspace/project
- The extension implements and registers a
TextDocumentContentProviderfor a particular URI scheme. - The generated HTML document is then opened in an editor using the command
vscode.previewHtml.
npm installnpm run compileto start the compiler in watch mode- open this folder in VS Code and press
F5
- open the debug viewlet (
Ctrl+Shift+DorCmd+Shift+Don Mac) and from the launch configuration dropdown pickLaunch Tests - press
F5to run the tests in a new window with your extension loaded - see the output of the test result in the debug console
- make changes to
test/extension.test.tsor create new test files inside thetestfolder- by convention, the test runner will only consider files matching the name pattern
**.test.ts - you can create folders inside the
testfolder to structure your tests any way you want
- by convention, the test runner will only consider files matching the name pattern