-
Notifications
You must be signed in to change notification settings - Fork 877
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
How do we use a prebuilt resources of vscode? #257
Comments
I think we can have a separate repo or directory in this repo to do things like https://github.com/Felx-B/vscode-web/blob/main/build.js And we can set another GitHub actions to publish the NPM package: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-paths We should consider supporting whether to build VS Code locally so that it easier to develop if we need to change the VS Code. I don't know whether there is a better way to do this without publishing the prebuilt version to NPM. |
Another benefit: we could use CDN link for NPM like https://unpkg.com/ |
In fact I've do that before, and try to use the unpkg as CDN. (https://www.npmjs.com/package/github1s) I don't know if I understand right: when a user request through the edge server back to the unpkg server, the unpkg server will fetch the npm package and decompress it. The size of github1s resource is large and cost seconds of time, and it will occured in the first request for every region. (Of couse the delay is also may because of my poor network quality) |
I think so and it should only happen on the initial load, which will be triggered by the development process or Vercel deploy (it will try to load the page once the deployment is done). I'm working on this and it seems we need to change a few more files in VS Code so that it could load extensions from local or hosted URL. |
The blockers I found so far: Lines 184 to 188 in e5a4e3d
Both If I change it to below code (PS: the
It wouldn't load the extension properly: This blocker only blocks us from hosting the VS Code related files from CDN. We could still publish a prebuilt version and refer it locally like this PR #118 |
I think we can do the following to publish the prebuilt vscode:
In addition, we can setup a https://codesandbox.io/docs/ci to test the prebuilt VS Code before actually publish the package. |
I have a proof of concept here: xcv58#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/ |
this looks good, I think you should create the same PR as draft for this, so we can work on it ( if needed ) |
Create #265 @conwnet Is this https://www.npmjs.com/~conwnet your NPM account? @Siddhant-K-code could you please tell me your NPM account? So that I can invite you to the NPM org https://www.npmjs.com/org/github1s |
Yes, It is me. Thank you so much for you wonderful work! It is excited! |
Here's my NPM Account => siddhant-k-code you can invite me Amazing Work @xcv58 🎉 |
@Siddhant-K-code sent out an invite on https://www.npmjs.com/ |
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:
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:
/src
directory, if someone have been updated, then rebuild the vscode and publish them to the github releases.vscode-github1s
(whatever), and set thepostinstall script
to donwload the prebuilt resoruces from github releases, then put them into corresponding.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? 🙏
The text was updated successfully, but these errors were encountered: