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

Proposal: Communicate used tailwind version #15

Open
nidico opened this issue Oct 21, 2022 · 8 comments
Open

Proposal: Communicate used tailwind version #15

nidico opened this issue Oct 21, 2022 · 8 comments

Comments

@nidico
Copy link
Collaborator

nidico commented Oct 21, 2022

I wonder if it would make sense to output the used tailwind version to

a) the generated elm files (as a comment)
b) the build process output of npx elm-tailwind-modules.

Maybe together with a hash of the used tailwind.config.js file?

My motivation behind the proposal is that I just noticed by accident that I'm still using tailwind v2 on a development machine (tailwindcss is installed manually there at the moment).

@nidico
Copy link
Collaborator Author

nidico commented Oct 21, 2022

While looking at this: Should elm-tailwind-modules version 0.4.0 only be used with tailwindcss version 3.1.6, as ^3.1.6 is listed in devDependencies in package.json (and not with e.g. tailwindcss 3.2.1)?

(I'm a bit confused, as running npm i --save-dev elm-tailwind-modules pulls tailwindcss version 2.2.19, not 3.1.6...)

@matheus23
Copy link
Owner

elm-tailwind-modules's devDependencies are purely for when you check out the repository and want to develop with the project.
You'll see the actual requirements for users of the package in dependencies and peerDependencies, the latter of which contains the tailwindcss bounds.

@matheus23
Copy link
Owner

As for the proposal of communicating the tailwind version, that's a great idea :)

I don't think the tailwind config hash is going to be super meaningful to the user, but maybe just printing back the resolved file name for the config may be helpful.

@nidico
Copy link
Collaborator Author

nidico commented Oct 22, 2022

elm-tailwind-modules's devDependencies are purely for when you check out the repository and want to develop with the project. You'll see the actual requirements for users of the package in dependencies and peerDependencies, the latter of which contains the tailwindcss bounds.

Thanks for the explanation! So does the tailwindcss ^2.0.2 peerDependency mean users shold use tailwindcss 2.0.2 and not e.g. 3.x? Looking at the docs about peerDependencies doesn't really help much. I'm a bit confused, as 0.4.0 added support for tailwindcss v3...

@matheus23
Copy link
Owner

I'm getting confused here as well. I guess tailwind version 3.0.0 isn't covered by the version bound ^2.0.2. I guess it should actually be something like ^2.0.2 || ^3.1.6 or so.

@nidico
Copy link
Collaborator Author

nidico commented Oct 25, 2022

I'm getting confused here as well. I guess tailwind version 3.0.0 isn't covered by the version bound ^2.0.2. I guess it should actually be something like ^2.0.2 || ^3.1.6 or so.

Yeah, this would be sufficient until tailwind <4 is released. Old tailwind docs state that tailwind follows semantic versioning, so this should be fine.

@matheus23
Copy link
Owner

I think this should be covered now.

@nidico
Copy link
Collaborator Author

nidico commented Feb 13, 2023

I think this should be covered now.

I don't see how... In my case I can't find the string 3.2.4 (the used tailwindcss version) in either of the generated elm files or the output of elm-tailwind-modules, no matter if it's called with --with-docs or not. Did I overlook something?

@matheus23 matheus23 reopened this Feb 13, 2023
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

2 participants