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

Improve DEBUG flag #6797

Merged
merged 2 commits into from
Dec 29, 2021
Merged

Improve DEBUG flag #6797

merged 2 commits into from
Dec 29, 2021

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Dec 29, 2021

This PR will improve the parsing of the DEBUG flag.
Currently we only check if you provided a DEBUG flag and that you didn't provide the value 0. This worked so far, but it's time to improve upon this.

There is the debug package which is used by many applications and includes some conventions: https://github.com/debug-js/debug#conventions

So now we will ensure that take care of the following cases:

Value Debug enabled
'true' true
'1' true
'false' false
'0' false
'*' true
'tailwind' true
'tailwind:*' true
'tailwindcss' true
'tailwindcss:*' true
'other,tailwind' true
'other,tailwind:*' true
'other,tailwindcss' true
'other,tailwindcss:*' true
'other,-tailwind' false
'other,-tailwind:*' false
'other,-tailwindcss' false
'other,-tailwindcss:*' false
'-tailwind' false
'-tailwind:*' false
'-tailwindcss' false
'-tailwindcss:*' false

Added a bit of code but the good part is that this only runs once at the beginning so shouldn't be too bad.

Fixes: #6769

@RobinMalfait RobinMalfait changed the title improve DEBUG flag Improve DEBUG flag Dec 29, 2021
@RobinMalfait RobinMalfait changed the title Improve DEBUG flag Improve DEBUG flag Dec 29, 2021
@RobinMalfait RobinMalfait merged commit 10710b0 into master Dec 29, 2021
@RobinMalfait RobinMalfait deleted the improve-debug-output branch December 29, 2021 22:51
@mustafa0x
Copy link

mustafa0x commented Jul 2, 2023

Is there a config option to tell tailwind to ignore DEBUG=1? I have it in my .env for my backend, but tailwind picks it up, since I'm using direnv, which automatically loads .env files.

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.

DEBUG environment variable
2 participants