GithubHelp home page GithubHelp logo

Comments (6)

danburzo avatar danburzo commented on June 3, 2024 1

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.

danburzo avatar danburzo commented on June 3, 2024 1

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.

nnmrts avatar nnmrts commented on June 3, 2024 1

@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/[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.

danburzo avatar danburzo commented on June 3, 2024 1

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.

nnmrts avatar nnmrts commented on June 3, 2024

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.

nnmrts avatar nnmrts commented on June 3, 2024

Going to try this out later today or tomorrow. Thanks for the release!

from culori.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.