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

Commit 615f7d0

Browse files
committed
Simplify changes
1 parent 55eb739 commit 615f7d0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lib/generateRules.js

Lines changed: 4 additions & 5 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,8 +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
179+
const twConfigPrefix = context.tailwindConfig.prefix || ''
180+
const twConfigPrefixLen = twConfigPrefix.length
182181

183182
if (candidatePrefix[twConfigPrefixLen] === '-') {
184183
negative = true

0 commit comments

Comments
 (0)