-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prettify
postcss-selector-parser
errors
- Loading branch information
1 parent
0358486
commit a1b438e
Showing
1 changed file
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,16 +124,28 @@ function getOrderedClassList( | |
color('Twin requires a newer version of tailwindcss, please update') | ||
) // `getClassOrder` was added in [email protected] | ||
|
||
const orderedClassList = tailwindContext | ||
.getClassOrder(convertedClassList) | ||
.map(([className, order], index): [bigint, string, string] => [ | ||
order || 0n, | ||
className, | ||
classList[index], | ||
]) | ||
.sort(([a], [z]) => bigSign(a - z)) | ||
|
||
return orderedClassList | ||
let orderedClassList | ||
|
||
try { | ||
orderedClassList = tailwindContext | ||
.getClassOrder(convertedClassList) | ||
.map(([className, order], index): [bigint, string, string] => [ | ||
order || 0n, | ||
className, | ||
classList[index], | ||
]) | ||
.sort(([a], [z]) => bigSign(a - z)) | ||
} catch (error: unknown) { | ||
assert( | ||
false, | ||
({ color }) => | ||
`${color(error as string)}\n\nFound in:\n${convertedClassList.join( | ||
' ' | ||
)}` | ||
) | ||
} | ||
|
||
return orderedClassList as Array<[bigint, string, string]> | ||
} | ||
|
||
function getStyles( | ||
|