-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Documentation: Update "Installation" guide with clearer guidance on build tools and CDNs #25468
Conversation
How about I think the CDN approach is more common for people using codepen & co. |
Done!
I think that's correct, it's OK to the local server in the guide here though right? As opposed to pointing people to Codepen etc.? |
Cool! This looks good to me 👍 |
On the installation catalogue. The first 2 paragraphs. Installation Most web developers install JavaScript libraries like three.js from the npm package registry, then develop their project using build tools like Vite or Webpack. Because three.js is also popular with many communities that may not be as familiar with these tools, this guide also describes a simplified "static" installation using a CDN instead of a build tool. I think overwhelmingly, when users enter the installation catalogue, their feeling is. And I would address that by simply enlisting the ways in which it can be installed. So I would replace the installation paragraph with the following. Threejs can be installed in the following ways:
The links can then be later placed underneath the npm Option. ################# If you already know how to set up a project and install npm dependencies, you can skip the rest of this Installation guide and install three.js with the line below. Otherwise, continue to Project structure section. npm install --save three If the user already knows how to install Threejs, I don't think they will enter the installation catalogue. The installation line can then be moved to be the first thing under the npm category. Then there comes: Option 1: Installing with a build tool But that's just the Npm option so I would replace it with: 1: Npm |
Thanks @hermannji! I've addressed most of that I think.
I didn't understand what you mean here, sorry. I'm happy with this section as it is, but could be open to more specific changes. |
Regarding paragraph Project Structure The Name The Location Redundant Newlines Index Title One Click Hello World |
Thanks @hermannji! I appreciate your review. On the remaining points, I think that I prefer how the PR is written now. You are certainly welcome to propose improvements in a new PR if you'd like though, we can always improve this more. |
What does PR stand for? |
PR is short for "pull request", which is just to say that after this change is merged, you can propose any changes to the file. GitHub has a helpful guide on this. |
I think @drcmda is correct in the comment thread here — our current installation guide doesn't get users to a simple working setup as directly as it could. We've got sections on Microsoft IIS and Ruby servers, but nothing on a (much easier) Vite setup that can handle imports for you, and the instructions on CDNs and import maps could be simplified too.
That's partly on me — the last rewrite, in 2020, focused on introducing ES Modules but didn't give a decent story for build tools. I think we should also be consistent about showing imports that refer to "three" rather than a direct URL pointing to a CDN, and leave resolution to import maps or the build tool.
To improve things, I'm proposing a couple changes:
This should also fit well with what Bruno describes in the three.js journey / Local Server video.
Preview: