-
Notifications
You must be signed in to change notification settings - Fork 547
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
Updated fork #321
Comments
@gka @regorxxx @iyinchao @stormwarning @salvoravida @Artoria2e5 @OlaoluwaM @tstaylor7 @tremby @taisukef Hello you all! I tagged you because you're either the original owner of this repo, or someone who most-recently made significant features and updates in a fork of this repo (I looked at the network graph). I figured, so as not to let this project get stale, perhaps we can all get together and help maintain a fork of it. I started a fork from @regorxxx's in a new org, and I've invited you all to the org (anyone else want to join, please comment here!): https://github.com/chroma-js/chroma.js I will taking some inspiration from @taisukef's fork and starting from @regorxxx's fork making it all work as vanilla ES Modules, and deleting all traces of CommonJS (we can optionally add a CommonJS build if people really need that, but CommonJS is the past, ES Modules are the present and the future). |
Thanks for pointing it out. If I reach for Chroma again at some point I'll consider using one fork or the other. But in truth I haven't felt much need for Chroma since browsers improved their colour space support to include things like Oklab and Oklch. |
Oh I see you invited me to join the org too. I'm not going to at this point; one reason is that I feel a bit uncomfortable about it being named "chroma-js" without signoff (as far as I know) from the original author. |
Thank you for pointing it out! |
That's easy to change. The original author @gka is also invited. GitHub does not allow user names or org names with a period, so |
Alright folks, the great work from @regorxxx and @taisukef is merged. The code is now all ES Modules: https://github.com/chroma-js/chroma.js Unlike your fork @taisukef, this keeps https://raw.githack.com/chroma-js/chroma.js/main/index.js When I run the docs, the colorful sidebar is missing (even on your fork @regorxxx): Need to figure out where that went. All scripts except The dev process does not work in Windows at all. That is going to be fixed... The root
|
I force pushed to https://github.com/chroma-js/chroma.js as there was one small mistake in the merge with an import path, now the |
Aaaaaaalrighty! An initial working test for Deno is pushed @taisukef. "test:deno": "deno run test/test-deno.js", |
Most tests passing in Chrome browser running as vanilla ES Modules. Need to iron a few out:
|
@regorxxx @taisukef there's one particular test where the numbers are quite different between both of your forks. I'm wondering why that is. Here are the tests in question: Both of you forked from this repo's 2.4.2 release, and one fork changed something that modified the numbers and I'm wondering what's correct. |
Once I have time, if I find working with ES modules is easier for me, I will help with that. Right now I'm using chroma within a context where modules are not available and only just plain JS loading of files or require. If I can not work around that, will continue developing my fork. |
@regorxxx ah, thanks!
I hope you will! ESM is the future-forward module standard for all JS runtimes, so we should support it as a default anyway. We can add CommonJS or global build back fairly easily, but:
Out of curiousity, what context is that and how does it stop you from using ESM? Is it an old browser or Node version? All browser and non-browser JS runtimes today support |
@trusktr Not a browser related context, but foobar2000. There are JS plugins for it, to create any frontend/backend element, so I can use most libraries with full support for ES6. But import/require, etc. are not available. I can polyfill require, but can not do that with import. |
Ah I see. We can remedy that. We can have a build step that procudes the global build (f.e. UMD format or similar). That way by default people can use ES modules but old environments can still have an option. |
Thanks for the effort in this fork, I keep getting the old 2.4.2 version. Are the instructions on the website up to date? |
Obviously forks are not on npm. Download from github (will update that part of the docs) |
whoops, sorry for not noticing this. happy to move chroma.js to a different repo if more ppl feel inclined to help. however, I'm in the middle of a big refactoring so we may want to wait for this before moving the repo (see #336) |
Also, very open to a general discussion about the future of chroma and opening the project to more maintainers since I'm pretty busy most of the time. How about we try to set up a call or a Discord group, perhaps this one https://discord.gg/m2M7k5Nf ? Looking forward to collaborating! |
An updated fork can be found here, with all dependencies updated, vulnerabilities fixed and new features (along relevant pendant pull request).
https://github.com/regorxxx/chroma.js
Docs have also been updated. Can be replaced directly without changes.
The text was updated successfully, but these errors were encountered: