Skip to content

Commit c30a32e

Browse files
authored
Drop unused tailwindDirectives argument (#5624)
1 parent 5d6d84f commit c30a32e

4 files changed

+6
-14
lines changed

src/lib/setupContextUtils.js

+5-11
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ function collectLayerPlugins(root) {
456456
return layerPlugins
457457
}
458458

459-
function resolvePlugins(context, tailwindDirectives, root) {
459+
function resolvePlugins(context, root) {
460460
let corePluginList = Object.entries(corePlugins)
461461
.map(([name, plugin]) => {
462462
if (!context.tailwindConfig.corePlugins.includes(name)) {
@@ -475,7 +475,7 @@ function resolvePlugins(context, tailwindDirectives, root) {
475475
return typeof plugin === 'function' ? plugin : plugin.handler
476476
})
477477

478-
let layerPlugins = collectLayerPlugins(root, tailwindDirectives)
478+
let layerPlugins = collectLayerPlugins(root)
479479

480480
// TODO: This is a workaround for backwards compatibility, since custom variants
481481
// were historically sorted before screen/stackable variants.
@@ -667,12 +667,7 @@ function registerPlugins(plugins, context) {
667667
}
668668
}
669669

670-
export function createContext(
671-
tailwindConfig,
672-
changedContent = [],
673-
tailwindDirectives = new Set(),
674-
root = postcss.root()
675-
) {
670+
export function createContext(tailwindConfig, changedContent = [], root = postcss.root()) {
676671
let context = {
677672
disposables: [],
678673
ruleCache: new Set(),
@@ -687,7 +682,7 @@ export function createContext(
687682
stylesheetCache: null,
688683
}
689684

690-
let resolvedPlugins = resolvePlugins(context, tailwindDirectives, root)
685+
let resolvedPlugins = resolvePlugins(context, root)
691686
registerPlugins(resolvedPlugins, context)
692687

693688
return context
@@ -698,7 +693,6 @@ let configContextMap = sharedState.configContextMap
698693
let contextSourcesMap = sharedState.contextSourcesMap
699694

700695
export function getContext(
701-
tailwindDirectives,
702696
root,
703697
result,
704698
tailwindConfig,
@@ -760,7 +754,7 @@ export function getContext(
760754

761755
env.DEBUG && console.log('Setting up new context...')
762756

763-
let context = createContext(tailwindConfig, [], tailwindDirectives, root)
757+
let context = createContext(tailwindConfig, [], root)
764758

765759
trackModified([...contextDependencies], getFileModifiedMap(context))
766760

src/lib/setupTrackingContext.js

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ export default function setupTrackingContext(configOrPath) {
139139
}
140140

141141
let [context] = getContext(
142-
tailwindDirectives,
143142
root,
144143
result,
145144
tailwindConfig,

src/lib/setupWatchingContext.js

-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ export default function setupWatchingContext(configOrPath) {
249249
}
250250

251251
let [context, isNewContext] = getContext(
252-
tailwindDirectives,
253252
root,
254253
result,
255254
tailwindConfig,

src/processTailwindFeatures.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function processTailwindFeatures(setupContext) {
2222
})
2323
},
2424
createContext(tailwindConfig, changedContent) {
25-
return createContext(tailwindConfig, changedContent, tailwindDirectives, root)
25+
return createContext(tailwindConfig, changedContent, root)
2626
},
2727
})(root, result)
2828

0 commit comments

Comments
 (0)