Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do we use a prebuilt resources of vscode?

See original GitHub issue

I 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:

  1. Reduce build/dev time significantly (both CI and local)
  2. More simple prerequisites for development
  3. 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:

  1. 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.
  2. provide an npm package named such as vscode-github1s(whatever), and set the postinstall script to donwload the prebuilt resoruces from github releases, then put them into corresponding.
  3. provider another npm script named yarn 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

xcv58commented, Apr 1, 2021

I have a proof of concept here:

It publishes the NPM package:

The CI test passed in less than 6 minutes:

Vercel deployment finished in less than 3 minutes: image

Demo link:

xcv58commented, Mar 31, 2021

I think we can do the following to publish the prebuilt vscode:

  1. Add a subdirectory call vscode-web-github1s or any name that makes sense.
  2. Create a package.json for publish it to NPM which should include the field: `files: [“/dist”]"
  3. Decouple the watch:vscode,, from the yarn watch and yarn build commands., and move them into the new package.json file. And update them to copy lib/vscode/out-vscode-min/ to vscode-web-github1s/dist.
  4. Use the yalc or 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)
  5. Update the index*.html to include vs code files from node_modules like /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 the scripts/package/ to sync node_modules/vscode-web-github1s/dist to the dist/static so that the structure keeps the same to avoid the issue).
  6. If the above steps could work, we should be able to successfully publish the npm package. Then use yarn add to include the package.

In addition, we can setup a to test the prebuilt VS Code before actually publish the package.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found