Skip to content

Instantly share code, notes, and snippets.

@GrandSchtroumpf
Created May 7, 2020 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GrandSchtroumpf/4442b6861faec7100712449b83900c5b to your computer and use it in GitHub Desktop.
Save GrandSchtroumpf/4442b6861faec7100712449b83900c5b to your computer and use it in GitHub Desktop.
Markdium-VSCode extension inside a nx workspace
import { promises as fs } from 'fs'; // Require @types/node@latest
import { join } from 'path';
// On activation
export function activate(context: ExtensionContext) {
// Register command "start"
commands.registerCommand('start', async () => {
...
const indexPath = join(context.extensionPath, 'studio/index.html');
const html = await fs.readFile(indexPath, 'utf-8');
panel.webview.html = html;
...
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment