Sort events / observables in all cases
Right now this only changes the order of events of the UrlTile class.
This commit is contained in:
@@ -120,6 +120,19 @@ exports.astNodeVisitor = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function sortOtherMembers(doclet) {
|
||||||
|
if (doclet.fires) {
|
||||||
|
doclet.fires.sort(function(a, b) {
|
||||||
|
return a.split(/#?event:/)[1] < b.split(/#?event:/)[1] ? -1 : 1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (doclet.observables) {
|
||||||
|
doclet.observables.sort(function(a, b) {
|
||||||
|
return a.name < b.name ? -1 : 1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exports.handlers = {
|
exports.handlers = {
|
||||||
|
|
||||||
newDoclet: function(e) {
|
newDoclet: function(e) {
|
||||||
@@ -149,16 +162,7 @@ exports.handlers = {
|
|||||||
if (doclet.kind == 'class') {
|
if (doclet.kind == 'class') {
|
||||||
includeAugments(doclet);
|
includeAugments(doclet);
|
||||||
}
|
}
|
||||||
if (doclet.fires) {
|
sortOtherMembers(doclet);
|
||||||
doclet.fires.sort(function(a, b) {
|
|
||||||
return a.split(/#?event:/)[1] < b.split(/#?event:/)[1] ? -1 : 1;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (doclet.observables) {
|
|
||||||
doclet.observables.sort(function(a, b) {
|
|
||||||
return a.name < b.name ? -1 : 1;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// Always document namespaces and items with stability annotation
|
// Always document namespaces and items with stability annotation
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -175,6 +179,7 @@ exports.handlers = {
|
|||||||
// constructor from the docs.
|
// constructor from the docs.
|
||||||
doclet._hideConstructor = true;
|
doclet._hideConstructor = true;
|
||||||
includeAugments(doclet);
|
includeAugments(doclet);
|
||||||
|
sortOtherMembers(doclet);
|
||||||
} else if (!doclet._hideConstructor && !(doclet.kind == 'typedef' && doclet.longname in types)) {
|
} else if (!doclet._hideConstructor && !(doclet.kind == 'typedef' && doclet.longname in types)) {
|
||||||
// Remove all other undocumented symbols
|
// Remove all other undocumented symbols
|
||||||
doclet.undocumented = true;
|
doclet.undocumented = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user