Skip to content

Commit

Permalink
Within a wildcard patterns' results, sort the file names explicitly r…
Browse files Browse the repository at this point in the history
…ather than counting on file system to do it for us.
  • Loading branch information
Jan Miksovsky committed Mar 28, 2013
1 parent 38fcc37 commit b7cd502
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sort-dependencies",
"description": "Build helper that sorts the names of files (JavaScript, CSS, etc.) based on a file naming convention that indicates dependencies",
"version": "0.1.0",
"version": "0.1.1",
"author": {
"name": "Jan Miksovsky",
"url": "http://miksovsky.blogs.com/flowstate"
Expand Down
5 changes: 3 additions & 2 deletions sort-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ exports.sortFiles = function() {
var classFileNames = [];
for ( var i in patterns ) {
var fileNames = glob.glob( patterns[i] );
classFileNames = classFileNames.concat( fileNames );
var sortedFileNames = fileNames.sort();
classFileNames = classFileNames.concat( sortedFileNames );
}

var dependencies = [];
Expand Down Expand Up @@ -140,4 +141,4 @@ function flatten( a ) {
results = [ a ];
}
return results;
}
}

0 comments on commit b7cd502

Please sign in to comment.