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

Embed JIT engine directly into Tailwind #3905

Merged
merged 10 commits into from
Apr 2, 2021
Merged

Embed JIT engine directly into Tailwind #3905

merged 10 commits into from
Apr 2, 2021

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?

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.

3 participants