question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: Publish to deno.land/x and nest.land

See original GitHub issue

Fortunately 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:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
danburzocommented, Dec 4, 2021

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.

1reaction
nnmrtscommented, Dec 2, 2021

@danburzo

(I don’t think these are urgent, since they’re mostly related to tree-shaking for a better bundle size and I don’t imagine people are using Deno for bundling code for browsers just yet, are they?)

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to publish Deno modules - DEV Community ‍ ‍
For more information about the Deno registry, head over to it's landing page at https://deno.land/x/ (which also has usage guides) and check out ......
Read more >
Publishing Modules | Manual - Deno
A common way to publish Deno modules is via the official https://deno.land/x hosting service. It caches releases of open source modules and serves...
Read more >
reno | nest.land
Published on Nest.land. Reno is a thin routing library designed to sit on top of. Deno's standard HTTP module. Overview; Key Features ......
Read more >
nestdotland/nest.land: The Nest Website - GitHub
Nest.land combines Deno with the Arweave Blockchain. With us, you can publish your Deno modules to the permaweb, where they can never be...
Read more >
What is Deno, and how is it different from Node.js?
Deno, a JavaScript runtime developed by Ryan Dahl, aims to fix ... Deno's features are designed to improve upon the capabilities of Node.js....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found