Drop unused tailwindDirectives argument (#5624)

This commit is contained in:
Robin Malfait 2021-09-28 12:00:27 +02:00 • committed by GitHub
parent 5d6d84fda1
commit c30a32e430
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 14 deletions

View file

@ -456,7 +456,7 @@ function collectLayerPlugins(root) {
return layerPlugins
}
function resolvePlugins(context, tailwindDirectives, root) {
function resolvePlugins(context, root) {
let corePluginList = Object.entries(corePlugins)
.map(([name, plugin]) => {
if (!context.tailwindConfig.corePlugins.includes(name)) {
@ -475,7 +475,7 @@ function resolvePlugins(context, tailwindDirectives, root) {
return typeof plugin === 'function' ? plugin : plugin.handler
})
let layerPlugins = collectLayerPlugins(root, tailwindDirectives)
let layerPlugins = collectLayerPlugins(root)
// TODO: This is a workaround for backwards compatibility, since custom variants
// were historically sorted before screen/stackable variants.
@ -667,12 +667,7 @@ function registerPlugins(plugins, context) {
}
}
export function createContext(
tailwindConfig,
changedContent = [],
tailwindDirectives = new Set(),
root = postcss.root()
) {
export function createContext(tailwindConfig, changedContent = [], root = postcss.root()) {
let context = {
disposables: [],
ruleCache: new Set(),
@ -687,7 +682,7 @@ export function createContext(
stylesheetCache: null,
}
let resolvedPlugins = resolvePlugins(context, tailwindDirectives, root)
let resolvedPlugins = resolvePlugins(context, root)
registerPlugins(resolvedPlugins, context)
return context
@ -698,7 +693,6 @@ let configContextMap = sharedState.configContextMap
let contextSourcesMap = sharedState.contextSourcesMap
export function getContext(
tailwindDirectives,
root,
result,
tailwindConfig,
@ -760,7 +754,7 @@ export function getContext(
env.DEBUG && console.log('Setting up new context...')
let context = createContext(tailwindConfig, [], tailwindDirectives, root)
let context = createContext(tailwindConfig, [], root)
trackModified([...contextDependencies], getFileModifiedMap(context))

View file

@ -139,7 +139,6 @@ export default function setupTrackingContext(configOrPath) {
}
let [context] = getContext(
tailwindDirectives,
root,
result,
tailwindConfig,

View file

@ -249,7 +249,6 @@ export default function setupWatchingContext(configOrPath) {
}
let [context, isNewContext] = getContext(
tailwindDirectives,
root,
result,
tailwindConfig,

View file

@ -22,7 +22,7 @@ export default function processTailwindFeatures(setupContext) {
})
},
createContext(tailwindConfig, changedContent) {
return createContext(tailwindConfig, changedContent, tailwindDirectives, root)
return createContext(tailwindConfig, changedContent, root)
},
})(root, result)