Better notebook markup renderer api (#121882)

* Better notebook markup renderer api

For #121256

- Use js modules for notebook output renderers
- Rename apis from `markdown` to `markup`
- Use imports and exports for apis instead of globals for apis
- Use esbuild instead of webpack so we can emit js modules
- Clearly split top level markup renderes from renderers that extend other renderers

* Use constant instead of comment for replacement
This commit is contained in:
Matt Bierner
2021-04-26 16:30:34 -07:00
committed by GitHub
parent 495d162a4e
commit 4cb27d2ec7
21 changed files with 295 additions and 201 deletions

View File

@@ -40,11 +40,14 @@
}
},
"contributes": {
"notebookMarkdownRenderer": [
"notebookMarkupRenderers": [
{
"id": "markdownItRenderer",
"displayName": "Markdown it renderer",
"entrypoint": "./notebook-out/index.js"
"entrypoint": "./notebook-out/index.js",
"mimeTypes": [
"text/markdown"
]
}
],
"commands": [
@@ -343,7 +346,7 @@
"vscode:prepublish": "npm run build-ext && npm run build-preview",
"build-ext": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:markdown-language-features ./tsconfig.json",
"build-preview": "npx webpack-cli --mode production",
"build-notebook": "npx webpack-cli --config webpack.notebook --mode production",
"build-notebook": "node ./esbuild",
"compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none",
"watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose"
},