This VSCode Web extension opens or clones a GitHub repository in a tunnel when a specific folder is opened and the URL contains ?repo=... query parameter with repo url.
⚠️ Make sure to setuptunnel-link.baseFoldersetting to point to your base folder where you want the repositories to be cloned/opened. Otherwise this extension will not do anything.
You should also install companion extension for Chrome that will inject a link on GitHub repository page that you can point to your specific vscode.dev tunnel and base folder.
Inputs:
- Your VSCode tunnel is
https://vscode.dev/tunnel/dev - You set
tunnel-link.baseFolderto/home/user/DEV
When you open this URL in your browser:
https://vscode.dev/tunnel/dev/home/user/DEV?repo=https://github.com/microsoft/vscode (either via the chrome extension link or by just entering it manually):
- VSCode Web will open
/home/user/DEVfolder in thedevtunnel tunnel-linkextension is activated because of the matchingbaseFolderand?repo=...query parameter is present- if
https://github.com/microsoft/vscodewas not cloned yet, it will be cloned into/home/user/DEV/vscodeand opened - if it is already cloned, it will just be opened
- if
Code structure:
- root of this repo is the source for the VSCode Web extension. With
extension.jsentry - Chrome extension is located in
chrome-extfolder, withmanifest.jsonentry, check links from there to figure out the functionality
- run
node ./serve-vscode-ext.mjsto serve the web extension - execute
Developer: Install Rxtension from Location...in VSCode and enterhttps://localhost:3000
Publishing:
- make sure to update version in
package.json - run
npm run packageto create a.vsixfile - go to https://marketplace.visualstudio.com/manage/publishers/
- click
New Extensionand upload the.vsixfile
- go to
chrome://extensionsin chrome - enable developer mode checkbox
- click
Load unpackedand selectchrome-extfolder in this repo - click reload button on the extension page to sync changes
Publishing:
- make sure to update version in
chrome-ext/manifest.json - create zip file of
chrome-extfolder:zip -r chrome-ext.zip chrome-ext - go to https://chrome.google.com/webstore/developer/dashboard
- click
Add new item(for update do:Build->Package->Upload new package) - upload
chrome-ext.zipfile - fill in all the details and publish
