Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit 20af816

Browse files
committed
Simplify changes
1 parent 55eb739 commit 20af816

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/lib/generateRules.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,15 @@ function applyImportant(matches) {
7171
}
7272
let result = []
7373

74-
for (let [{ sort, layer, options }, rule] of matches) {
74+
for (let [meta, rule] of matches) {
7575
let container = postcss.root({ nodes: [rule] })
7676
container.walkRules((r) => {
7777
r.selector = updateAllClasses(r.selector, (className) => {
7878
return `!${className}`
7979
})
8080
r.walkDecls((d) => (d.important = true))
8181
})
82-
let withOffset = [{ sort: sort, layer, options }, container.nodes[0]]
83-
result.push(withOffset)
82+
result.push([meta, container.nodes[0]])
8483
}
8584

8685
return result
@@ -177,9 +176,8 @@ function* resolveMatchedPlugins(classCandidate, context) {
177176
let candidatePrefix = classCandidate
178177
let negative = false
179178

180-
let twConfigPrefix = context.tailwindConfig.prefix || ''
181-
let twConfigPrefixLen = twConfigPrefix.length
182-
179+
const twConfigPrefix = context.tailwindConfig.prefix || ''
180+
const twConfigPrefixLen = twConfigPrefix.length
183181
if (candidatePrefix[twConfigPrefixLen] === '-') {
184182
negative = true
185183
candidatePrefix = twConfigPrefix + candidatePrefix.slice(twConfigPrefixLen + 1)

0 commit comments

Comments
 (0)