-
-
Notifications
You must be signed in to change notification settings - Fork 261
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 #370
devcontainer #370
Conversation
158f386
to
6fd2efc
Compare
@@ -0,0 +1 @@ | |||
../dist |
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.
I have added a dist
symlink in order the static server to serve
the examples/
folder as root (to fake that dist/
is inside examples/
, see #370 (review))
@@ -16,7 +16,7 @@ | |||
|
|||
<script src="https://unpkg.com/three@0.149.0/build/three.min.js"></script> | |||
<script src="https://unpkg.com/gsap@3.10.4/dist/gsap.min.js"></script> | |||
<script src="../dist/camera-controls.js"></script> | |||
<script src="dist/camera-controls.js"></script> |
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.
I just update with the dist
symlink here and for the other examples/*.html
files
@@ -27,7 +28,7 @@ | |||
"three": ">=0.126.1" | |||
}, | |||
"scripts": { | |||
"dev": "rollup --config --watch", | |||
"dev": "rollup --config --watch & serve -S -p 3000 examples/ && kill $!", |
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.
npm run dev
now rollup --watch
and serve
the examples
folder at the same time
6fd2efc
to
cc7cb28
Compare
cc7cb28
to
654873c
Compare
@@ -23,6 +23,7 @@ | |||
"husky": "^8.0.3", | |||
"lint-staged": "^13.1.2", | |||
"rollup": "^3.10.1", | |||
"serve": "^14.2.0", |
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.
oh nice!
I didn't think this can be possible with only one additional dependency.
and I would like to add this regardless of this PR anyway since non-es-module three.js will be deprecated.
(Actually, I didn't use a local server and opened with file://
, but es-module doesn't accept this anymore...)
🎉 This PR is included in version 2.3.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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:
This PR add a
.devcontainer
to the repository, that:npm ci
dist/
folder and startserve
ing theexamples/
folder to http://localhost:3000NB: It also works locally with Dev Containers extension
abernier:devcontainer
branch on Codespace: by clicking on