Comments (6)
Hi @nnmrts, thanks for the kind words! I've started looking at what we need to change for a first deno-compatible version for deno.land/x. In particular, decide how to handle mappings in package.json
for culori/fn
, culori/css
, and culori/all
:
"exports": {
"./require": "./bundled/culori.cjs",
".": "./src/index.js",
"./css": "./src/bootstrap/css.js",
"./all": "./src/bootstrap/all.js",
"./fn": "./src/index-fn.js"
}
(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?)
Otherwise, it seems to be pretty straightforward, I'll try a pre-release tag.
from culori.
Alright, I've pushed the 2.0.1-alpha.0
tag to GitHub, this seems to work pretty well:
import { rgb } from 'https://deno.land/x/[email protected]/index.js';
console.log(rgb('tomato'));
I'll update the docs and publish 2.0.1
, unless there are other concerns to address.
from culori.
(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/[email protected]/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.
from culori.
Thanks for the info! Leaving the files as they are for now. Starting with the just-published [email protected]
, the library is available to Deno users. I've also added a bit to the Getting Started page.
from culori.
Just found out that raw GitHub urls don't really work either, for .js files at least. Another alternative is jsdelivr of course, and that's what I'm using for now.
from culori.
Going to try this out later today or tomorrow. Thanks for the release!
from culori.
Related Issues (20)
- `lch()` and `lab()` in `formatCss` has no `%` HOT 3
- Culori ESM import throws an error in Next.js production build HOT 5
- Bug in displayable() in oklch HOT 3
- culori.d.ts - Is there an updated type declaration file to use with TypeScript? HOT 1
- Implement parse-time clamping of L lab/oklab/lch/oklch
- XYB: is the Chroma from Luma adjustment correction really in the JXL implementation? HOT 2
- Interpolator throwing a NaN/undefined HOT 4
- Library-wide handling of missing and powerless components HOT 2
- Endless loop when using a double point HOT 2
- Add RYB colors HOT 19
- mix() function, and 2d/3d counterparts
- Dead link in docs HOT 1
- Precise chroma clamping in P3 color space HOT 2
- Suggestion to specify target gamut for clampChroma() HOT 1
- Provide ability to tree-shake parsers. HOT 2
- Adjust <number> parsing in HSL / HWB / etc(?) modern syntaxes to appropriate component ranges
- `'culori/fn'` regression in 4.0 HOT 3
- Switch tests from `tape` to native Node test runner
- Addition of CMYK color space HOT 1
- Add DIN99c/d color space HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from culori.