Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We're following VS Code's call-to-action. This PR will improve PDF/PPTX/image export and resolving theme CSS in the virtual workspace. Close #224.
It depends on marp-team/marp-cli#343.
Approaches
Export action
Export command is depending on Marp CLI and Chromium so the work file should always place on the local file system. Thus, I've judged the most of exist codes using
fs
are not required to replace.Currently PDF/PPTX/image export (using Chromium) cannot resolve virtual assets provided by VS Code and extensions. So we're providing a simple local proxy during export process. By forcing base URL of work file to an address of the proxy, Chromium for conversion can consume presentation assets correctly.
Resolving custom theme CSS
Paths for custom theme CSS must be a relative path from the workspace. Now we are handling the case of in a virtual workspace while theme resolution. Auto-reloading CSS theme is also working even if in virtual workspace.
ToDo
baseUrl
option marp-cli#343