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

Add local VSCode build tasks #278

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gregdolley
Copy link
Contributor

Allows you to build and deploy your SynthWave extension changes right into your locally installed VSCode instance (an editor reload is required for some changes to take effect). You can also make a private .vsix extension install file for a friend to use and you don't have to worry about those changes ever ending up in the live marketplace.

In VSCode, open your command palette and select "Run Task...", you will see three new options:

  1. Run build
  2. Install extension to local VSCode instance
  3. Build and install extension to local VSCode instance

"Run build": only builds the .vsix extension install file and places it in the root folder of the project. Use this if you want to share a private version of the extension with a friend, or install the extension on another machine. On the destination machine, run this command to install it in VSCode:

code --install-extension <path to .vsix install file>

Example:

code --install-extension ~/synthwave-vscode-0.1.14.vsix

"Install extension to local VSCode instance": if you previously ran the "Run build" task, then choose this task to have VSCode automatically install the .vsix extension file for you (basically it's just running the example command above and reporting if there were errors in the task terminal window).

"Build and install extension to local VSCode instance": basically runs task #1 and #2 (build and install extension) as a single command reporting success or errors to the task terminal window.

Note: since these tasks depend on bash scripts, this feature can only be used on a Mac and Linux for now. I'll add the equivalent Windows configuration sometime soon.

These bash scripts are referenced by tasks.json - if you're running VSCode on a Mac or Linux, these scripts allow you to run a VSCode Build Task or generic Task for building the synthwave extension project into a locally deployable .vsix extension install package and have VSCode automatically install that package into your local VSCode instance.

This way you can test changes to the extension without publishing and without having to run the extension in a VSCode Extension Debug container.

Note: these scripts need to get updated when the version number of the extension changes
Forgot to chmod these scripts to executable ('755' - otherwise you'd get a permission error in VSCode's task runner)
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