-
-
Notifications
You must be signed in to change notification settings - Fork 36k
devcontainer #26055
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
devcontainer #26055
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
@@ -43,7 +43,7 @@ | |||
"test": "npm run lint && npm run test-unit", | |||
"build": "rollup -c utils/build/rollup.config.js", | |||
"build-module": "rollup -c utils/build/rollup.config.js --configOnlyModule", | |||
"dev": "concurrently --names \"ROLLUP,HTTP\" -c \"bgBlue.bold,bgGreen.bold\" \"rollup -c utils/build/rollup.config.js -w -m inline\" \"servez -p 8080 --ssl\"", | |||
"dev": "concurrently -P --names \"ROLLUP,HTTP\" -c \"bgBlue.bold,bgGreen.bold\" \"rollup -c utils/build/rollup.config.js -w -m inline\" \"servez -p 8080 --ssl {@}\"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is to allow overriding servez
options, for --ssl=false
in https://github.com/mrdoob/three.js/pull/26055/files#diff-24ad71c8613ddcf6fd23818cb3bb477a1fb6d83af4550b0bad43099813088686R9
see: concurrently -P
option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need --ssl=false
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--ssl=false
is only for inside the codespace, on https://localhost:8080, ssl will be ON like before
Actually --ssl=false
defined in devcontainer.json postAttachCommand
, will override the --ssl
flag defined by default in the npm start
script, so it has no impact on the npm start
command run locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the reason is that the endpoint Codespace mounts for the preview is already configured with ssl
Can the |
Unfortunately I think it cannot: https://containers.dev/implementors/spec/#devcontainerjson Also because devcontainers are not directly related to github: you can for example execute it on your local vscode with this extension https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers |
however you can have a the only drawback I can see, is if we want later to provide our own Dockerfile for the image: in that case, having a Tell me if you prefer that option, I'll change into a |
Do you mind doing a screen recording showing the developer experience? |
You can actually try it directly with that link: https://github.com/codespaces/new?template_repository=abernier%2Fthree.js&ref=devcontainer |
TBH, downloading the repo and executing |
Agreed. The PR didn't have many upvotes either... |
Description
This PR aims at enhancing the developer experience, by allowing anyone to have the project up-and-running in a Codespace in one click, right from his browser: https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/setting-up-your-repository/facilitating-quick-creation-and-resumption-of-codespaces
This PR adds a
.devcontainer
to the repository, that:npm ci
npm start
NB: It also works locally with Dev Containers extension
abernier:devcontainer
branch: