Sort by name when type count is the same

This commit is contained in:
Kevin Sawicki 2014-07-22 08:31:03 -07:00
parent 6a0e7cfb24
commit 0e201d539a

View File

@ -11,7 +11,11 @@ module.exports = (grunt) ->
types[extension]++
extensions = Object.keys(types).sort (extension1, extension2) ->
types[extension2] - types[extension1]
diff = types[extension2] - types[extension1]
if diff is 0
extension1.toLowerCase().localeCompare(extension2.toLowerCase())
else
diff
extensions.forEach (extension) ->
grunt.log.error "#{extension}: #{types[extension]}"