Skip to content

Commit

Permalink
Use case insensitive sort, see #595
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jul 26, 2017
1 parent 930f70f commit 6b5e5f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/grunt/sortRequireStatements.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ module.exports = function( grunt ) {
else {

// Not a require statement, sort and flush any pending require statements then continue
accumulator.sort();
accumulator.sort( function( a, b ) {

// case insensitive
return a.toLowerCase().localeCompare( b.toLowerCase() );
} );
accumulator.forEach( function( a ) {
result.push( a );
} );
Expand Down

0 comments on commit 6b5e5f4

Please sign in to comment.