Skip to content

Commit

Permalink
Adding --no-sort option (fixes #80)
Browse files Browse the repository at this point in the history
  • Loading branch information
timdp committed Sep 30, 2014
1 parent 729888e commit c863019
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1346,10 +1346,12 @@ YUI.add('doc-builder', function (Y) {
}
});

opts.meta.attrs.sort(self.nameSort);
opts.meta.events.sort(self.nameSort);
opts.meta.methods.sort(self.nameSort);
opts.meta.properties.sort(self.nameSort);
if (!self.options.dontsortfields) {
opts.meta.attrs.sort(self.nameSort);
opts.meta.events.sort(self.nameSort);
opts.meta.methods.sort(self.nameSort);
opts.meta.properties.sort(self.nameSort);
}

if (!opts.meta.methods.length) {
delete opts.meta.methods;
Expand Down
3 changes: 3 additions & 0 deletions lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ YUI.add('options', function (Y) {
}
}
break;
case "--no-sort":
options.dontsortfields = true;
break;
default:
if (!options.paths) {
options.paths = [];
Expand Down

0 comments on commit c863019

Please sign in to comment.