Skip to content

allow users to always generate unminified CSS #248

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

Closed
wants to merge 2 commits into from

Conversation

flavorjones
Copy link
Member

@flavorjones flavorjones commented Feb 12, 2023

Discussed in #243.
Closes #244.

This PR allows users to set an environment variable TAILWINDCSS_RAILS_NO_MINIFY to turn off minification.

@flavorjones flavorjones requested a review from dhh February 12, 2023 23:34
@flavorjones flavorjones force-pushed the flavorjones-allow-always-unminified branch from 3bd82c4 to 758471e Compare February 12, 2023 23:39
@flavorjones flavorjones force-pushed the flavorjones-allow-always-unminified branch from 758471e to 6425cb7 Compare February 14, 2023 20:48
end

def truthy_string_value(value)
if !value.present? ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have present? available? The core_ext is not being required in this gem. I think it only works in tests because the app is configured to require all core_ext.

@dhh
Copy link
Member

dhh commented Feb 15, 2023

I don't see the point? I see the request, but not the purpose.

@flavorjones
Copy link
Member Author

@the-pulli Can you explain your use case a bit more, please?

@the-pulli
Copy link

@flavorjones Sure thing. I have a project which uses TW and custom CSS. If I don't use yui as CSS compressor only my TW CSS gets minified and my custom CSS not. If I use yui as compressor TW gets again minified through yui and it get messed up. My custom CSS gets minified normally in this procedure. I was looking for a way to minify both TW and my custom CSS for production.

@dhh
Copy link
Member

dhh commented Feb 16, 2023

I think this should be fixed elsewhere rather than in TW. The minifier should be able to opt out of being applied to a given CSS. Rather than TW knowing about not having to minify.

@the-pulli
Copy link

@dhh So if I understood you right, there is currently no way to do this in Rails? It has to be implemented (preferable the code handling compression of the files), but not in TW?

@flavorjones flavorjones deleted the flavorjones-allow-always-unminified branch May 1, 2024 13:59
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

Successfully merging this pull request may close these issues.

[feature] allow users to always generate unminified CSS
4 participants