Skip to content

Conversation

@pappleby
Copy link

@pappleby pappleby commented Jun 8, 2025

This PR adds a new exportWorkspace command which compiles a project and returns the results. It uses the same existing functionality as the exportPreview / showPreview commands but stops before doing any further conversion. This would be useful for interop with other vscode extensions (my use case is an extension to support my WIP playdate port, but could imagine this also enabling lot of small bespoke tools to analyze/manage yarnspinner projects).

// perform a compilation and return the output (used to export to other VSCode extensions)
// Error handling / user-facing error messaging handled by the caller
context.subscriptions.push(
vscode.commands.registerCommand("yarnspinner.exportWorkspace", () => {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't also add this to the commands list in package.json, since there's not really any useful user facing output from this command.

@pappleby pappleby marked this pull request as draft June 8, 2025 17:09
@pappleby
Copy link
Author

pappleby commented Jun 8, 2025

Confirmed that the calling extension gets the compilation results:
{49B467FD-29F0-4854-86B6-3A6F976EDBDC}

@pappleby pappleby marked this pull request as ready for review June 8, 2025 17:24
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.

1 participant