Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support virtual workspaces #225

Merged
merged 14 commits into from
May 10, 2021
Merged

Support virtual workspaces #225

merged 14 commits into from
May 10, 2021

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented May 8, 2021

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.

⚠️ FileSystemWatcher looks like supporting the custom scheme for a virtual workspace, but it requires VS Code >= 1.52.

ToDo

@yhatt yhatt marked this pull request as ready for review May 10, 2021 03:32
@yhatt yhatt changed the title [In progress] Support virtual workspaces Support virtual workspaces May 10, 2021
@yhatt yhatt merged commit 0bcc8c4 into main May 10, 2021
@yhatt yhatt deleted the virtual-workspaces branch May 10, 2021 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define whether supports a virtual workspace
1 participant