mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
* Disable backdrop variant * Disable enabled variant * Disable border spacing utilities * Disable text-start/end utilities * Disable poll option in CLI * Disable ring color default fn * Disable dark mode class name customization * Disable support for `Document` node types * Disable rgb/hsl fns * Update tests * Temporarily disable type generation * Update changelog
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
import setupTrackingContext from './lib/setupTrackingContext'
|
|
import processTailwindFeatures from './processTailwindFeatures'
|
|
import { env } from './lib/sharedState'
|
|
|
|
module.exports = function tailwindcss(configOrPath) {
|
|
return {
|
|
postcssPlugin: 'tailwindcss',
|
|
plugins: [
|
|
env.DEBUG &&
|
|
function (root) {
|
|
console.log('\n')
|
|
console.time('JIT TOTAL')
|
|
return root
|
|
},
|
|
function (root, result) {
|
|
let context = setupTrackingContext(configOrPath)
|
|
|
|
/*
|
|
if (root.type === 'document') {
|
|
let roots = root.nodes.filter((node) => node.type === 'root')
|
|
|
|
for (const root of roots) {
|
|
if (root.type === 'root') {
|
|
processTailwindFeatures(context)(root, result)
|
|
}
|
|
}
|
|
|
|
return
|
|
}
|
|
*/
|
|
|
|
processTailwindFeatures(context)(root, result)
|
|
},
|
|
env.DEBUG &&
|
|
function (root) {
|
|
console.timeEnd('JIT TOTAL')
|
|
console.log('\n')
|
|
return root
|
|
},
|
|
].filter(Boolean),
|
|
}
|
|
}
|
|
|
|
module.exports.postcss = true
|