File tree 1 file changed +21
-0
lines changed 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -681,6 +681,27 @@ $assets: (
681
681
. join ( path . posix . sep ) ;
682
682
} )
683
683
. map ( partial => partial . replace ( / \. s c s s $ / , '' ) )
684
+ // sort by directory basename
685
+ . sort ( ( a , b ) => {
686
+ const aBase = path
687
+ . basename ( path . dirname ( a ) )
688
+ . toLocaleLowerCase ( ) ;
689
+ const bBase = path
690
+ . basename ( path . dirname ( b ) )
691
+ . toLocaleLowerCase ( ) ;
692
+ if ( aBase > bBase ) return 1 ;
693
+ if ( aBase < bBase ) return - 1 ;
694
+ return 0 ;
695
+ } )
696
+ // sort by file basename
697
+ . sort ( ( a , b ) => {
698
+ const aBase = path . basename ( a ) . toLocaleLowerCase ( ) ;
699
+ const bBase = path . basename ( b ) . toLocaleLowerCase ( ) ;
700
+ if ( aBase > bBase ) return 1 ;
701
+ if ( aBase < bBase ) return - 1 ;
702
+ return 0 ;
703
+ } )
704
+ // sort by priority
684
705
. sort ( ( a , b ) => {
685
706
const aMatch =
686
707
SassPartialRegistry . list . find ( ( { pattern } ) =>
You can’t perform that action at this time.
0 commit comments