Skip to content

Conversation

@adamwathan
Copy link
Member

@adamwathan adamwathan commented Apr 2, 2021

This PR takes the @tailwindcss/jit project and embeds it directly into Tailwind itself behind a new configuration option:

// tailwind.config.js
module.exports = {
  mode: 'jit',
  // ...
}

This feature is still in preview/experimental and is not subject to semver as we continue to work out the kinks.

@codecov-io
Copy link

codecov-io commented Apr 2, 2021

Codecov Report

Merging #3905 (40165b7) into master (60b5d63) will decrease coverage by 6.57%.
The diff coverage is 83.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3905      +/-   ##
==========================================
- Coverage   93.34%   86.77%   -6.58%     
==========================================
  Files         178      311     +133     
  Lines        1849     4235    +2386     
  Branches      332      788     +456     
==========================================
+ Hits         1726     3675    +1949     
- Misses        105      485     +380     
- Partials       18       75      +57     
Impacted Files Coverage Δ
jit/corePlugins/borderRadius.js 18.00% <18.00%> (ø)
jit/corePlugins/borderWidth.js 31.03% <31.03%> (ø)
jit/corePlugins/scale.js 42.10% <42.10%> (ø)
jit/lib/utils.js 48.64% <48.64%> (ø)
src/index.js 82.05% <55.55%> (-8.58%) ⬇️
jit/lib/setupContext.js 70.53% <70.53%> (ø)
jit/lib/rewriteTailwindImports.js 71.42% <71.42%> (ø)
jit/index.js 71.87% <71.87%> (ø)
jit/lib/expandTailwindAtRules.js 81.42% <81.42%> (ø)
jit/corePlugins/transitionProperty.js 83.33% <83.33%> (ø)
... and 278 more

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 60b5d63...40165b7. Read the comment docs.

@adamwathan adamwathan merged commit fea75a0 into master Apr 2, 2021
@adamwathan adamwathan deleted the embed-jit branch April 2, 2021 18:34
@adamwathan adamwathan changed the title [WIP] Embed JIT engine directly into Tailwind Embed JIT engine directly into Tailwind Apr 2, 2021
@excitedbox
Copy link

How would this be implemented into something like a page builder? For example, the builder uses a full tailwind CSS file and on saving it would prune the CSS file in a certain subdirectory / path. Would it be easier to generate a separate config in each subdirectory and run the compiler over that instead?

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 83.14121% with 351 lines in your changes missing coverage. Please review.

Project coverage is 86.77%. Comparing base (60b5d63) to head (40165b7).

Files with missing lines Patch % Lines
jit/lib/setupContext.js 70.53% 101 Missing and 21 partials ⚠️
jit/corePlugins/borderRadius.js 18.00% 33 Missing and 8 partials ⚠️
jit/lib/expandTailwindAtRules.js 81.42% 21 Missing and 5 partials ⚠️
jit/corePlugins/borderWidth.js 31.03% 16 Missing and 4 partials ⚠️
jit/lib/utils.js 48.64% 16 Missing and 3 partials ⚠️
jit/corePlugins/scale.js 42.10% 9 Missing and 2 partials ⚠️
jit/lib/generateRules.js 92.94% 11 Missing ⚠️
jit/index.js 71.87% 9 Missing ⚠️
jit/pluginUtils.js 93.13% 7 Missing ⚠️
jit/corePlugins/index.js 90.32% 6 Missing ⚠️
... and 44 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3905      +/-   ##
==========================================
- Coverage   93.34%   86.77%   -6.58%     
==========================================
  Files         178      311     +133     
  Lines        1849     4235    +2386     
  Branches      332      788     +456     
==========================================
+ Hits         1726     3675    +1949     
- Misses        105      485     +380     
- Partials       18       75      +57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

5 participants