chore(doc-gen): improve grouping and sorting of api nav items

This commit is contained in:
Peter Bacon Darwin
2014-02-19 16:21:20 +00:00
parent b488bbf4bf
commit 3fbc25718e

View File

@@ -56,8 +56,19 @@ var navGroupMappers = {
delete docTypes.module;
})
.tap(function(docTypes) {
if ( docTypes.input ) {
docTypes.directive = docTypes.directive || [];
// Combine input docTypes into directive docTypes
docTypes.directive = docTypes.directive.concat(docTypes.input);
delete docTypes.input;
}
})
.forEach(function(sectionPages, sectionName) {
sectionPages = _.sortBy(sectionPages, 'name');
if ( sectionPages.length > 0 ) {
// Push a navItem for this section
navItems.push({