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 report
to view stack analysis report on one manifest file - Use command
Show fabric8-analytics stack report on Workspace
to view stack analysis report on entire workspace/project
- The extension implements and registers a
TextDocumentContentProvider
for a particular URI scheme. - The generated HTML document is then opened in an editor using the command
vscode.previewHtml
.
npm install
npm run compile
to start the compiler in watch mode- open this folder in VS Code and press
F5
- open the debug viewlet (
Ctrl+Shift+D
orCmd+Shift+D
on Mac) and from the launch configuration dropdown pickLaunch Tests
- press
F5
to 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.ts
or create new test files inside thetest
folder- by convention, the test runner will only consider files matching the name pattern
**.test.ts
- you can create folders inside the
test
folder to structure your tests any way you want
- by convention, the test runner will only consider files matching the name pattern