How do we use a prebuilt resources of vscode?
See original GitHub issueI found there are some enthusiastic developers who want to run GitHub1s locally, but some of them have met problems during the building process.😫 Inspired by vscode-web, a talking with @xcv58 , and the issues like #62 #162 #118, etc. I think we should provide a prebuilt version of vscode. There are many advantages to this:
- Reduce build/dev time significantly (both CI and local)
- More simple prerequisites for development
- Less memory/CPU cost during development
The problem is we have already modified the code of vscode, and we should able to update the resources if there are some new changes of vscode.
In my opionon, we can do that:
- set a workflow to check the hash of files in
/src
directory, if someone have been updated, then rebuild the vscode and publish them to the github releases. - provide an npm package named such as
vscode-github1s
(whatever), and set thepostinstall script
to donwload the prebuilt resoruces from github releases, then put them into corresponding. - provider another
npm script
namedyarn dev:extensions
for developer who just care the/extensions
directory.
I wanna if there is a more graceful way to do this or if there some problems in this way? 🙏
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Developing inside a Container - Visual Studio Code
The Visual Studio Code Dev Containers extension lets you use a Docker container as a full-featured development environment. It allows you to open...
Read more >Bundling Extensions - Visual Studio Code
The vscode:prepublish is used by vsce , the VS Code packaging and publishing tool, and run before publishing an extension. Passing the --minify...
Read more >Create a Dev Container - Visual Studio Code
Start with Dev Containers: Clone Repository in Container Volume in the Command Palette (F1). If the repository you enter does not have a...
Read more >Remote Development Tips and Tricks - Visual Studio Code
Visual Studio Code Remote Development troubleshooting tips and tricks for SSH, Containers, and the Windows Subsystem for Linux (WSL)
Read more >Dev Container Features - Visual Studio Code
The dev container CLI, GitHub Action, or Azure DevOps task can also be used to pre-build images that include Feature contents to speed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have a proof of concept here: https://github.com/xcv58/github1s/pull/20
It publishes the NPM package: https://www.npmjs.com/package/@github1s/vscode-web
The CI test passed in less than 6 minutes: https://github.com/xcv58/github1s/pull/20/checks?check_run_id=2243362528
Vercel deployment finished in less than 3 minutes:
Demo link: https://github1s-git-npm-package-xcv58.vercel.app/
I think we can do the following to publish the prebuilt vscode:
vscode-web-github1s
or any name that makes sense.package.json
for publish it to NPM which should include the field: `files: [“/dist”]"watch:vscode
,build-vscode.sh
,copy-vscode.sh
from theyarn watch
andyarn build
commands., and move them into the newpackage.json
file. And update them to copylib/vscode/out-vscode-min/
tovscode-web-github1s/dist
.yarn link
to test the package publish locally. (We could leverage the yalc to do the local development if we need to change VS Code locally)/static/vscode/vs/loader.js
->/static/node_modules/vscode-web-github1s/dist/vscode/vs/loader.js
. (This might break the local extension loading as well, we could update thescripts/package/copy-node_modules.sh
to syncnode_modules/vscode-web-github1s/dist
to thedist/static
so that the structure keeps the same to avoid the issue).yarn add
to include the package.In addition, we can setup a https://codesandbox.io/docs/ci to test the prebuilt VS Code before actually publish the package.