Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Updated glob sorting to sort files in parent directories ahead of files in sub-directories. #195
Previously Dir.sort was called, which would result in the following sort order:
The patch changes the sort order to the following:
My motivation for the patch was having the following structure:
view.js defined a views namespace. action.js used it. Of course there are other ways to fix this, but the updated sort order seemed to make sense anyway.
I added one test to test the behaviour.