Fix style
This commit is contained in:
parent
f97456483c
commit
7afeeb7084
59 changed files with 84 additions and 143 deletions
48
jit/index.js
48
jit/index.js
|
|
@ -1,5 +1,4 @@
|
|||
const postcss = require('postcss')
|
||||
const dlv = require('dlv')
|
||||
|
||||
const evaluateTailwindFunctions = require('../lib/lib/evaluateTailwindFunctions').default
|
||||
const substituteScreenAtRules = require('../lib/lib/substituteScreenAtRules').default
|
||||
|
|
@ -57,53 +56,6 @@ module.exports = (configOrPath = {}) => {
|
|||
return root
|
||||
},
|
||||
].filter(Boolean)
|
||||
|
||||
return {
|
||||
postcssPlugin: 'tailwindcss-jit',
|
||||
plugins: [
|
||||
env.DEBUG &&
|
||||
function (root) {
|
||||
console.log('\n')
|
||||
console.time('JIT TOTAL')
|
||||
return root
|
||||
},
|
||||
function (root, result) {
|
||||
function registerDependency(fileName, type = 'dependency') {
|
||||
result.messages.push({
|
||||
type,
|
||||
plugin: 'tailwindcss-jit',
|
||||
parent: result.opts.from,
|
||||
file: fileName,
|
||||
})
|
||||
}
|
||||
|
||||
rewriteTailwindImports(root)
|
||||
|
||||
let context = setupContext(configOrPath)(result, root)
|
||||
|
||||
if (!env.TAILWIND_DISABLE_TOUCH) {
|
||||
if (context.configPath !== null) {
|
||||
registerDependency(context.configPath)
|
||||
}
|
||||
}
|
||||
|
||||
return postcss([
|
||||
removeLayerAtRules(context),
|
||||
expandTailwindAtRules(context, registerDependency),
|
||||
expandApplyAtRules(context),
|
||||
evaluateTailwindFunctions(context.tailwindConfig),
|
||||
substituteScreenAtRules(context.tailwindConfig),
|
||||
collapseAdjacentRules(context),
|
||||
]).process(root, { from: undefined })
|
||||
},
|
||||
env.DEBUG &&
|
||||
function (root) {
|
||||
console.timeEnd('JIT TOTAL')
|
||||
console.log('\n')
|
||||
return root
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
module.exports.postcss = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue