Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DaisyUI support #150

Closed
lorenzomorandini opened this issue Feb 5, 2025 · 7 comments
Closed

DaisyUI support #150

lorenzomorandini opened this issue Feb 5, 2025 · 7 comments

Comments

@lorenzomorandini
Copy link

Hi, thanks for the package! What could be the best way to use daisyUI together with this?

@oliverandrich
Copy link
Member

I am not using daisyUI myself, but what I learned from other users is: Install tailwind and daisyUI globally.

I think npm install -g tailwindcss @tailwindcss/cli daisyui should do the trick. But the "bad part" is, that you need to create a shell skript to wrap npx @tailwindcss/cli.

Then you can point TAILWIND_CLI_PATH to the absolute path of the script.

This script should do the job and allows it to be referenced by my library.

#!/bin/sh
npx @tailwindcss/cli $@

Give me feedback if this works. It sounds like a good addition to the docs.

@lorenzomorandini
Copy link
Author

I'll try and it probably does work but I guess it kind of defeat the purpose of this package: not directly having to do with node, right?

@oliverandrich
Copy link
Member

Yes, this is indeed a bit against the idea of the package. But my personal taste is also, that I always run with plain Tailwind without any component packages. But I am curious to learn, if it works.

@oliverandrich
Copy link
Member

@lorenzomorandini I have a better solution for you.

https://github.com/dobicinaitis/tailwind-cli-extra

@Tobi-De Added support for externally maintained Tailwind CSS CLIs. His package has support for daisyUI.

@Tobi-De
Copy link
Contributor

Tobi-De commented Feb 9, 2025

@oliverandrich
Copy link
Member

@Tobi-De I just released version 4.0.0 from this package. In case you are updating your package to Tailwind CSS 4.0, we might face some issues. I test for some things if the major version is smaller than 4 or higher than 4. I wanted to be backward compatible and allow people to transition slowly. Everything with a version number less than 4 is treated as it is Tailwind CSS 3.x.

@Tobi-De
Copy link
Contributor

Tobi-De commented Feb 9, 2025

In case you are updating your package to Tailwind CSS 4.0.

Correction here: it's not my package.

Versions lower than 4 are treated as if they are Tailwind CSS 3.x.

Ah, this might be an issue. Yes, @dobicinaitis' CLI has its own version, which doesn’t match either the Tailwind or DaisyUI versions since it integrates both. I haven’t looked at Tailwind CSS 4 yet, but if a lot has changed, switching the source repo might break compatibility with something using Tailwind 4 but with a different version name.

I just took a quick look at DaisyUI 5's installation guide for Tailwind 4, and even there things have changed. Maybe changing the source repo won’t be necessary anymore. I’ll investigate this later when I have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants