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

Resolve purge paths #4214

Merged
merged 7 commits into from
May 7, 2021
Merged

Resolve purge paths #4214

merged 7 commits into from
May 7, 2021

Conversation

bradlc
Copy link
Contributor

@bradlc bradlc commented Apr 30, 2021

Fixes #3948

This PR resolves purge paths relative to the config file when there is one, or the current working directory when there isn't. This avoids running into a fast-glob bug, but also is just generally sensible I think, as we want the paths to be relative to the config file, and not the current working directory.

@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2021

Codecov Report

Merging #4214 (a93b033) into master (e764df5) will increase coverage by 0.49%.
The diff coverage is 92.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4214      +/-   ##
==========================================
+ Coverage   71.17%   71.67%   +0.49%     
==========================================
  Files         218      220       +2     
  Lines        4721     4730       +9     
  Branches      776      780       +4     
==========================================
+ Hits         3360     3390      +30     
+ Misses       1274     1260      -14     
+ Partials       87       80       -7     
Impacted Files Coverage Δ
src/index.js 82.05% <ø> (ø)
src/lib/purgeUnusedStyles.js 98.63% <87.50%> (-1.37%) ⬇️
src/jit/lib/setupContext.js 78.14% <100.00%> (+5.34%) ⬆️
src/processTailwindFeatures.js 94.11% <100.00%> (ø)
tests/fixtures/custom-purge-config.js 100.00% <100.00%> (ø)
tests/jit/relative-purge-paths.config.js 100.00% <100.00%> (ø)
src/jit/index.js 61.90% <0.00%> (+4.76%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e764df5...a93b033. Read the comment docs.

@adamwathan adamwathan merged commit 477dd06 into master May 7, 2021
@adamwathan adamwathan deleted the resolve-purge-paths branch May 7, 2021 17:46
@adamwathan
Copy link
Member

Thank you sir!

adamwathan pushed a commit that referenced this pull request May 7, 2021
* resolve purge paths

* add test for purgecss pattern resolution

* resolve purgecss patterns relative to the config file if there is one

* account for raw content when transforming purgecss options

* append test name to postcss `from` option in purge tests
fixes tests hanging

* add test for relative purge path resolution in JIT mode
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.

Not all classes are being pulled in from Blade files, some only after re-saving the files.
3 participants