How to publish/install VS Code extensions via github.com
instead using of dev.azure.com
?
I assume the steps would look like:
git clone 'https://github.com/abc/xyz.git'
vsce package
git add -A && git commit -m 'initialized vscode extension'
git push origin
and then in VS Code there would be some option to install a plugin from https://github.com/abc/xyz.git
is this possible?
CodePudding user response:
VS Code can install a vsix package (which is actually a zip), but that must be in the local file system. You cannot specify a URL as source.
CodePudding user response:
On a macOS/Linux machine, you can do this:
- assume your VS Code extension is hosted at
https://github.com/abc/xyz.git
git clone 'https://github.com/abc/xyz.git'
ln -s "$PWD/xyz" "$HOME/.vscode/extensions/xyz"
(create a softlink)
When you open VS Code, if you look in installed extensions, it will show your extension. No need to compile anything to vsix, it runs your JavaScript. In other words, create your git repo that represents your VS Code extension, clone it locally, and symlink that folder to ~/.vscode/extensions/xyz
. I am sure on Windows that the concept is the same.