From 6b5e5f4eec718abb6d90f01bf12f7fb62466bb8a Mon Sep 17 00:00:00 2001 From: samreid Date: Wed, 26 Jul 2017 14:32:23 -0600 Subject: [PATCH] Use case insensitive sort, see https://github.com/phetsims/chipper/issues/595 --- js/grunt/sortRequireStatements.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/grunt/sortRequireStatements.js b/js/grunt/sortRequireStatements.js index a231d75a4..185511728 100644 --- a/js/grunt/sortRequireStatements.js +++ b/js/grunt/sortRequireStatements.js @@ -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 ); } );