-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Remove false positive warning in CLI when using the --content
option
#7220
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you use the cli with the `--content` option, then we first resolve the config (empty), then add the `content` to the config. The issue is that this means that the content will be empty when you resolve it initially. This results in a warning in your terminal. Now, we will make sure to merge 2 configs if you have the `--content` data passed. We will also make sure to override the final `config.content.files` to whatever you passed in to make sure that this is the same behaviour as before.
RobinMalfait
changed the title
Ensure content files are available in config
Remove false positive warning in CLI when using the Jan 26, 2022
--content
option
RobinMalfait
force-pushed
the
fix-cli-content-warning
branch
from
January 26, 2022 18:28
ab52941
to
bebebdc
Compare
@RobinMalfait Wow, fixed & released less than 24 hours later. Thanks so much! 🎉 |
@EatonZ thank you for the bug report! If you run into other issues, feel free to open new issues, thanks! |
dukex
added a commit
to dukex/tailwindcss-rails
that referenced
this pull request
Feb 15, 2022
# CHANGELOG ## [3.0.22] - 2022-02-11 ### Fixed - Temporarily move postcss to dependencies ([#7424](tailwindlabs/tailwindcss#7424)) ## [3.0.21] - 2022-02-10 ### Fixed - Move prettier plugin to dev dependencies ([#7418](tailwindlabs/tailwindcss#7418)) ## [3.0.20] - 2022-02-10 ### Added - Expose `context.sortClassList(classes)` ([#7412](tailwindlabs/tailwindcss#7412)) ## [3.0.19] - 2022-02-07 ### Fixed - Fix preflight border color fallback ([#7288](tailwindlabs/tailwindcss#7288)) - Correctly parse shadow lengths without a leading zero ([#7289](tailwindlabs/tailwindcss#7289)) - Don't crash when scanning extremely long class candidates ([#7331](tailwindlabs/tailwindcss#7331)) - Use less hacky fix for URLs detected as custom properties ([#7275](tailwindlabs/tailwindcss#7275)) - Correctly generate negative utilities when dash is before the prefix ([#7295](tailwindlabs/tailwindcss#7295)) - Detect prefixed negative utilities in the safelist ([#7295](tailwindlabs/tailwindcss#7295)) ## [3.0.18] - 2022-01-28 ### Fixed - Fix `@apply` order regression (in `addComponents`, `addUtilities`, ...) ([#7232](tailwindlabs/tailwindcss#7232)) - Quick fix for incorrect arbitrary properties when using URLs ([#7252](tailwindlabs/tailwindcss#7252)) ## [3.0.17] - 2022-01-26 ### Fixed - Remove false positive warning in CLI when using the `--content` option ([#7220](tailwindlabs/tailwindcss#7220)) ## [3.0.16] - 2022-01-24 ### Fixed - Ensure to transpile the PostCSS Nesting plugin (tailwindcss/nesting) ([#7080](tailwindlabs/tailwindcss#7080)) - Improve various warnings ([#7118](tailwindlabs/tailwindcss#7118)) - Fix grammatical mistake ([cca5a38](tailwindlabs/tailwindcss@cca5a38))
dhh
pushed a commit
to rails/tailwindcss-rails
that referenced
this pull request
Feb 19, 2022
# CHANGELOG ## [3.0.22] - 2022-02-11 ### Fixed - Temporarily move postcss to dependencies ([#7424](tailwindlabs/tailwindcss#7424)) ## [3.0.21] - 2022-02-10 ### Fixed - Move prettier plugin to dev dependencies ([#7418](tailwindlabs/tailwindcss#7418)) ## [3.0.20] - 2022-02-10 ### Added - Expose `context.sortClassList(classes)` ([#7412](tailwindlabs/tailwindcss#7412)) ## [3.0.19] - 2022-02-07 ### Fixed - Fix preflight border color fallback ([#7288](tailwindlabs/tailwindcss#7288)) - Correctly parse shadow lengths without a leading zero ([#7289](tailwindlabs/tailwindcss#7289)) - Don't crash when scanning extremely long class candidates ([#7331](tailwindlabs/tailwindcss#7331)) - Use less hacky fix for URLs detected as custom properties ([#7275](tailwindlabs/tailwindcss#7275)) - Correctly generate negative utilities when dash is before the prefix ([#7295](tailwindlabs/tailwindcss#7295)) - Detect prefixed negative utilities in the safelist ([#7295](tailwindlabs/tailwindcss#7295)) ## [3.0.18] - 2022-01-28 ### Fixed - Fix `@apply` order regression (in `addComponents`, `addUtilities`, ...) ([#7232](tailwindlabs/tailwindcss#7232)) - Quick fix for incorrect arbitrary properties when using URLs ([#7252](tailwindlabs/tailwindcss#7252)) ## [3.0.17] - 2022-01-26 ### Fixed - Remove false positive warning in CLI when using the `--content` option ([#7220](tailwindlabs/tailwindcss#7220)) ## [3.0.16] - 2022-01-24 ### Fixed - Ensure to transpile the PostCSS Nesting plugin (tailwindcss/nesting) ([#7080](tailwindlabs/tailwindcss#7080)) - Improve various warnings ([#7118](tailwindlabs/tailwindcss#7118)) - Fix grammatical mistake ([cca5a38](tailwindlabs/tailwindcss@cca5a38))
aisen-lopez
pushed a commit
to aisen-lopez/rails-tailwindcss-template
that referenced
this pull request
Apr 1, 2022
# CHANGELOG ## [3.0.22] - 2022-02-11 ### Fixed - Temporarily move postcss to dependencies ([#7424](tailwindlabs/tailwindcss#7424)) ## [3.0.21] - 2022-02-10 ### Fixed - Move prettier plugin to dev dependencies ([#7418](tailwindlabs/tailwindcss#7418)) ## [3.0.20] - 2022-02-10 ### Added - Expose `context.sortClassList(classes)` ([#7412](tailwindlabs/tailwindcss#7412)) ## [3.0.19] - 2022-02-07 ### Fixed - Fix preflight border color fallback ([#7288](tailwindlabs/tailwindcss#7288)) - Correctly parse shadow lengths without a leading zero ([#7289](tailwindlabs/tailwindcss#7289)) - Don't crash when scanning extremely long class candidates ([#7331](tailwindlabs/tailwindcss#7331)) - Use less hacky fix for URLs detected as custom properties ([#7275](tailwindlabs/tailwindcss#7275)) - Correctly generate negative utilities when dash is before the prefix ([#7295](tailwindlabs/tailwindcss#7295)) - Detect prefixed negative utilities in the safelist ([#7295](tailwindlabs/tailwindcss#7295)) ## [3.0.18] - 2022-01-28 ### Fixed - Fix `@apply` order regression (in `addComponents`, `addUtilities`, ...) ([#7232](tailwindlabs/tailwindcss#7232)) - Quick fix for incorrect arbitrary properties when using URLs ([#7252](tailwindlabs/tailwindcss#7252)) ## [3.0.17] - 2022-01-26 ### Fixed - Remove false positive warning in CLI when using the `--content` option ([#7220](tailwindlabs/tailwindcss#7220)) ## [3.0.16] - 2022-01-24 ### Fixed - Ensure to transpile the PostCSS Nesting plugin (tailwindcss/nesting) ([#7080](tailwindlabs/tailwindcss#7080)) - Improve various warnings ([#7118](tailwindlabs/tailwindcss#7118)) - Fix grammatical mistake ([cca5a38](tailwindlabs/tailwindcss@cca5a38))
anderscain63
added a commit
to anderscain63/tailwindcss-rails
that referenced
this pull request
Dec 20, 2022
# CHANGELOG ## [3.0.22] - 2022-02-11 ### Fixed - Temporarily move postcss to dependencies ([#7424](tailwindlabs/tailwindcss#7424)) ## [3.0.21] - 2022-02-10 ### Fixed - Move prettier plugin to dev dependencies ([#7418](tailwindlabs/tailwindcss#7418)) ## [3.0.20] - 2022-02-10 ### Added - Expose `context.sortClassList(classes)` ([#7412](tailwindlabs/tailwindcss#7412)) ## [3.0.19] - 2022-02-07 ### Fixed - Fix preflight border color fallback ([#7288](tailwindlabs/tailwindcss#7288)) - Correctly parse shadow lengths without a leading zero ([#7289](tailwindlabs/tailwindcss#7289)) - Don't crash when scanning extremely long class candidates ([#7331](tailwindlabs/tailwindcss#7331)) - Use less hacky fix for URLs detected as custom properties ([#7275](tailwindlabs/tailwindcss#7275)) - Correctly generate negative utilities when dash is before the prefix ([#7295](tailwindlabs/tailwindcss#7295)) - Detect prefixed negative utilities in the safelist ([#7295](tailwindlabs/tailwindcss#7295)) ## [3.0.18] - 2022-01-28 ### Fixed - Fix `@apply` order regression (in `addComponents`, `addUtilities`, ...) ([#7232](tailwindlabs/tailwindcss#7232)) - Quick fix for incorrect arbitrary properties when using URLs ([#7252](tailwindlabs/tailwindcss#7252)) ## [3.0.17] - 2022-01-26 ### Fixed - Remove false positive warning in CLI when using the `--content` option ([#7220](tailwindlabs/tailwindcss#7220)) ## [3.0.16] - 2022-01-24 ### Fixed - Ensure to transpile the PostCSS Nesting plugin (tailwindcss/nesting) ([#7080](tailwindlabs/tailwindcss#7080)) - Improve various warnings ([#7118](tailwindlabs/tailwindcss#7118)) - Fix grammatical mistake ([cca5a38](tailwindlabs/tailwindcss@cca5a38))
titan2gman
added a commit
to titan2gman/tailwindcss-rails
that referenced
this pull request
Dec 27, 2022
# CHANGELOG ## [3.0.22] - 2022-02-11 ### Fixed - Temporarily move postcss to dependencies ([#7424](tailwindlabs/tailwindcss#7424)) ## [3.0.21] - 2022-02-10 ### Fixed - Move prettier plugin to dev dependencies ([#7418](tailwindlabs/tailwindcss#7418)) ## [3.0.20] - 2022-02-10 ### Added - Expose `context.sortClassList(classes)` ([#7412](tailwindlabs/tailwindcss#7412)) ## [3.0.19] - 2022-02-07 ### Fixed - Fix preflight border color fallback ([#7288](tailwindlabs/tailwindcss#7288)) - Correctly parse shadow lengths without a leading zero ([#7289](tailwindlabs/tailwindcss#7289)) - Don't crash when scanning extremely long class candidates ([#7331](tailwindlabs/tailwindcss#7331)) - Use less hacky fix for URLs detected as custom properties ([#7275](tailwindlabs/tailwindcss#7275)) - Correctly generate negative utilities when dash is before the prefix ([#7295](tailwindlabs/tailwindcss#7295)) - Detect prefixed negative utilities in the safelist ([#7295](tailwindlabs/tailwindcss#7295)) ## [3.0.18] - 2022-01-28 ### Fixed - Fix `@apply` order regression (in `addComponents`, `addUtilities`, ...) ([#7232](tailwindlabs/tailwindcss#7232)) - Quick fix for incorrect arbitrary properties when using URLs ([#7252](tailwindlabs/tailwindcss#7252)) ## [3.0.17] - 2022-01-26 ### Fixed - Remove false positive warning in CLI when using the `--content` option ([#7220](tailwindlabs/tailwindcss#7220)) ## [3.0.16] - 2022-01-24 ### Fixed - Ensure to transpile the PostCSS Nesting plugin (tailwindcss/nesting) ([#7080](tailwindlabs/tailwindcss#7080)) - Improve various warnings ([#7118](tailwindlabs/tailwindcss#7118)) - Fix grammatical mistake ([cca5a38](tailwindlabs/tailwindcss@cca5a38))
smartech7
pushed a commit
to smartech7/rails-tailwind-css
that referenced
this pull request
Aug 4, 2023
# CHANGELOG ## [3.0.22] - 2022-02-11 ### Fixed - Temporarily move postcss to dependencies ([#7424](tailwindlabs/tailwindcss#7424)) ## [3.0.21] - 2022-02-10 ### Fixed - Move prettier plugin to dev dependencies ([#7418](tailwindlabs/tailwindcss#7418)) ## [3.0.20] - 2022-02-10 ### Added - Expose `context.sortClassList(classes)` ([#7412](tailwindlabs/tailwindcss#7412)) ## [3.0.19] - 2022-02-07 ### Fixed - Fix preflight border color fallback ([#7288](tailwindlabs/tailwindcss#7288)) - Correctly parse shadow lengths without a leading zero ([#7289](tailwindlabs/tailwindcss#7289)) - Don't crash when scanning extremely long class candidates ([#7331](tailwindlabs/tailwindcss#7331)) - Use less hacky fix for URLs detected as custom properties ([#7275](tailwindlabs/tailwindcss#7275)) - Correctly generate negative utilities when dash is before the prefix ([#7295](tailwindlabs/tailwindcss#7295)) - Detect prefixed negative utilities in the safelist ([#7295](tailwindlabs/tailwindcss#7295)) ## [3.0.18] - 2022-01-28 ### Fixed - Fix `@apply` order regression (in `addComponents`, `addUtilities`, ...) ([#7232](tailwindlabs/tailwindcss#7232)) - Quick fix for incorrect arbitrary properties when using URLs ([#7252](tailwindlabs/tailwindcss#7252)) ## [3.0.17] - 2022-01-26 ### Fixed - Remove false positive warning in CLI when using the `--content` option ([#7220](tailwindlabs/tailwindcss#7220)) ## [3.0.16] - 2022-01-24 ### Fixed - Ensure to transpile the PostCSS Nesting plugin (tailwindcss/nesting) ([#7080](tailwindlabs/tailwindcss#7080)) - Improve various warnings ([#7118](tailwindlabs/tailwindcss#7118)) - Fix grammatical mistake ([cca5a38](tailwindlabs/tailwindcss@cca5a38))
XLoopLion
added a commit
to XLoopLion/tailwindcss-rails
that referenced
this pull request
Jun 12, 2024
# CHANGELOG ## [3.0.22] - 2022-02-11 ### Fixed - Temporarily move postcss to dependencies ([#7424](tailwindlabs/tailwindcss#7424)) ## [3.0.21] - 2022-02-10 ### Fixed - Move prettier plugin to dev dependencies ([#7418](tailwindlabs/tailwindcss#7418)) ## [3.0.20] - 2022-02-10 ### Added - Expose `context.sortClassList(classes)` ([#7412](tailwindlabs/tailwindcss#7412)) ## [3.0.19] - 2022-02-07 ### Fixed - Fix preflight border color fallback ([#7288](tailwindlabs/tailwindcss#7288)) - Correctly parse shadow lengths without a leading zero ([#7289](tailwindlabs/tailwindcss#7289)) - Don't crash when scanning extremely long class candidates ([#7331](tailwindlabs/tailwindcss#7331)) - Use less hacky fix for URLs detected as custom properties ([#7275](tailwindlabs/tailwindcss#7275)) - Correctly generate negative utilities when dash is before the prefix ([#7295](tailwindlabs/tailwindcss#7295)) - Detect prefixed negative utilities in the safelist ([#7295](tailwindlabs/tailwindcss#7295)) ## [3.0.18] - 2022-01-28 ### Fixed - Fix `@apply` order regression (in `addComponents`, `addUtilities`, ...) ([#7232](tailwindlabs/tailwindcss#7232)) - Quick fix for incorrect arbitrary properties when using URLs ([#7252](tailwindlabs/tailwindcss#7252)) ## [3.0.17] - 2022-01-26 ### Fixed - Remove false positive warning in CLI when using the `--content` option ([#7220](tailwindlabs/tailwindcss#7220)) ## [3.0.16] - 2022-01-24 ### Fixed - Ensure to transpile the PostCSS Nesting plugin (tailwindcss/nesting) ([#7080](tailwindlabs/tailwindcss#7080)) - Improve various warnings ([#7118](tailwindlabs/tailwindcss#7118)) - Fix grammatical mistake ([cca5a38](tailwindlabs/tailwindcss@cca5a38))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will remove the false positive warning about the empty content option in your config.
When you are using the CLI, then we try to resolve the
tailwind.config.js
, but it can happen that you don't have one and that you are using the--content
flag instead.E.g.:
We do make sure that the
./index.html
file is eventually present in your config, but it isn't initially and therefore you get the (incorrect) warning.We fixed this by making sure that your
--content
is present immediately which removes the incorrect warning.Note: You will still receive a warning if we didn't generate any utilities at all. This is a valid warning, and an indication that you might have linked the wrong content files, or that you didn't use any Tailwind classes yet.
Fixes: #7210