kidonng / daisyui

A UnoCSS-compatible redistribution of daisyUI
https://npm.im/@kidonng/daisyui
MIT License
21 stars 2 forks source link

Version and feature matching with daisy #1

Closed gotjoshua closed 1 year ago

gotjoshua commented 2 years ago

Do you have plans to match daisy version by version? Is your code base auto generated from daisy or is there much manual effort needed?

Thanks very much for the contribution!

kidonng commented 2 years ago

Do you have plans to match daisy version by version?

Good question. There are still a couple of pending changes before I can claim this "done", then we may try something like automated updates.

Is your code base auto generated from daisy or is there much manual effort needed?

It's generated by build.ts, which honestly doesn't do much.

gotjoshua commented 2 years ago

If you go to auto generated, i guess it makes sense to match the version tags from daisy, right?

Are you looking for help with any of the finishing touches?

gotjoshua commented 2 years ago

So I finally got around to trying out this implementation in my demo app. Unfortunately, it doesn't work, because i am using daisyui full.css from cdn

I assume this is generated via the build job in package.json

Can you imagine to include a build step that will also publish full.css in the format that fits with your unocss preset?

Actually what are the advantages to use the daisy uno preset over the cdn version?

note: I also opened an issue to see if esbuild can do this on the fly...

kidonng commented 2 years ago

Unfortunately, it doesn't work, because i am using daisyui full.css from cdn

daisyUI's CDN version already have everything compiled, unocss-preset-daisy isn't designed to work with it. It's not an issue with this package either.

Can you imagine to include a build step that will also publish full.css in the format that fits with your unocss preset?

Unless you are using UnoCSS without a build step (runtime version), I don't see the benefit of including a full.css, do you want to fetch and compile the style yourself?

Actually what are the advantages to use the daisy uno preset over the cdn version?

The CDN version doesn't allow customizing or selective import, while being 10x large compared to a full build using UnoCSS.

gotjoshua commented 2 years ago

runtime version

I am using the runtime version... And although bigger, i have the opinion that the bloated size can be offset if many developers use the same CDN so that the libs get well cached in the wild.

Runtime compilation with transformer directives could be cool. Thanks for that link.

I am curious how the size of a full.css with all the @apply directives intact will compare to the daisy full.css that is shipping now.

Thanks for the exchange!

kidonng commented 2 years ago

the bloated size can be offset if many developers use the same CDN so that the libs get well cached in the wild.

I don't know your target users, but most websites nowadays rarely use public CDNs for libraries other than the most popular ones (jQuery etc.) let alone niche ones like UnoCSS, so the potential cache benefits is neglectable.

I am curious how the size of a full.css with all the @apply directives intact will compare to the daisy full.css that is shipping now.

I just added a full build (and a minified one), the latter being 111KB and 22.1KB after gzipping.

philippedasilva-orizone commented 1 year ago

Hi @kidonng I forked this repo and made a quick sync up with daisyui 2.41.0 and when I tried to make a pull request, it seems I can't do so. Are you blocking pull requests on your side or am I doing something wrong?

I must admit I never really worked with repos including submodules so maybe the issue lies there? Don't know :)

Cheers

kidonng commented 1 year ago

I didn't block anything, I was just absent. I'm doing the sync work now.

kidonng commented 1 year ago

Good news! Since unocss-preset-daisy 3.0.0, you no longer need this package (@kidonng/daisyui). Instead, just install and upgrade the official daisyui package to keep up-to-date.