Closed marcusrbrown closed 3 years ago
🔥 🔥 🔥
I guess there isn't anything to hold off on, I'll get going on adding support for bundling.
Maybe bundle with rollup to be cute? 🤣 Pros: API is slick, used it once, it's not Webpack. Cons: 🤷♂️ it's not Webpack.
I'll give it shot with rollup
. Most extensions use Wepback, but I believe that is preference.
The docs in the link about bundling from MS show you how to do it with WebPack so obviously I want to do it with rollup now... No preference either way tbh.
Ok, this one is good for review. Summary of changes over the last couple of days:
README.md
:
$ unzip -l textproto-grammer-0.0.4.vsix
Archive: textproto-grammer-0.0.4.vsix
Length Date Time Name
--------- ---------- ----- ----
2872 12-07-2020 00:53 extension.vsixmanifest
516 12-07-2020 00:53 [Content_Types].xml
20435 12-07-2020 00:53 extension/bundle.js
406 12-07-2020 00:53 extension/CHANGELOG.md
213731 12-02-2020 15:21 extension/images/highlight-reel.gif
15171 12-02-2020 15:21 extension/images/icon.png
881 12-03-2020 20:58 extension/language-configuration.json
1069 12-02-2020 15:21 extension/LICENSE.txt
3180 12-07-2020 00:43 extension/package.json
367 12-07-2020 00:53 extension/README.md
1426 12-03-2020 11:22 extension/syntaxes/codeblock.json
8242 12-03-2020 20:58 extension/syntaxes/textproto.tmLanguage.json
--------- -------
268296 12 files
npm
scripts and VS Code editor lifecycle support. You can hit Cmd+Shift+B while editing to start Rollup in watch mode, or hit F5 to launch the debugger and Rollup will remain in watch mode until you kill it. Source maps are supported in development builds only.npm version
git push origin --tags
which will trigger the publish
and release
jobs.
Will get this rolled out ASAP! Thanks again!
This adds support of highlighting syntax within fenced code blocks in Markdown preview Web Views.
The biggest impact of this change is the extension now includes a code bundle. I do not make any effort to optimize the size of the bundle in this PR, I will add that feature in a separate one. Until that happens, packaging the extension will result in the following message:
Note that the majority of these files come from Highlight.js to support other languages and themese. Bundling support will remove these extra files and minify the extension code, which will drastically reduce the extension size.
The Highlight.js language definition will need to be improved, I plan to tackle this when I circle back to update the TextMate grammar to be more correct. The version I included here is just to demonstrate the syntax highlighting working in the webview.