Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated glob sorting to sort files in parent directories ahead of files in sub-directories. #195

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liehann
Copy link

@liehann liehann commented Jul 29, 2011

Previously Dir[].sort was called, which would result in the following sort order:
/a/a/a.js
/a/b.js

The patch changes the sort order to the following:
/a/b.js
/a/a/a.js

My motivation for the patch was having the following structure:
views/views.js
views/model/action.js

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.

files in subdirectories. eg:
/a/b.js
/a/a/a.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant