Feature request: Publish to deno.land/x and nest.land
See original GitHub issueFortunately culori is already written in modern pure ESM format and AFAIK doesn’t use any node.js-specific built-ins, so publishing it to https://deno.land/x and/or https://nest.land should be straight-forward. This would allow Deno users to enjoy culori in a more ergonomic way than currently possible. An example of currently supported ways to use culori in Deno:
import { rgb } from "https://esm.sh/culori@2";
import { rgb } from "https://raw.githubusercontent.com/Evercoder/culori/main/src/index.js";
Both of the options above have several drawbacks. esm.sh
is a great service but usually bundles/transpiles the code of a module, while GitHub raw.
URLs are really long and also don’t really support any form of versioning.
If you agree culori should be made “Deno-community-compatible” and need help with publishing, I’m happy to help. I have gained some experience using Deno for the last few months so far and even published a small module to https://nest.land, so I may be actually useful for once. 😆
PS: I just discovered this project while pondering about writing my own “modern” color library which includes oklab
support. Turns out I don’t need to, because culori is already amazing and somehow exactly what I imagined my library to be. Thanks. 🥲
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top GitHub Comments
Thanks for the info! Leaving the files as they are for now. Starting with the just-published
culori@2.0.1
, the library is available to Deno users. I’ve also added a bit to the Getting Started page.@danburzo
I personally don’t, and I also think the future is in bundle-free projects, but for example, currently one of the most popular frameworks out there is this: https://alephjs.org/
Aleph.js bundles the modules into one big file (I think). I assume the overwhelming majority of people using Deno for web development right now, are in fact bundling their code, so publishing
index-fn.js
as well might be particularly useful, at least for the next few years. The thing is though, people can already use that file instead, by just importing it through its url:https://deno.land/x/culori@v2.0.1-alpha.0/index-fn.js
.Offering different variants of a module like this is common in the Deno community, so I think this is just fine as it is at the moment.