build(aio): refactor filterMemberDocs to be more general
Now it also filters function-overloads, hence the name change.
This commit is contained in:
parent
433d479a1e
commit
57cfcb0830
|
@ -20,7 +20,7 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
|
||||||
.processor(require('./processors/mergeDecoratorDocs'))
|
.processor(require('./processors/mergeDecoratorDocs'))
|
||||||
.processor(require('./processors/extractDecoratedClasses'))
|
.processor(require('./processors/extractDecoratedClasses'))
|
||||||
.processor(require('./processors/matchUpDirectiveDecorators'))
|
.processor(require('./processors/matchUpDirectiveDecorators'))
|
||||||
.processor(require('./processors/filterMemberDocs'))
|
.processor(require('./processors/filterContainedDocs'))
|
||||||
.processor(require('./processors/markBarredODocsAsPrivate'))
|
.processor(require('./processors/markBarredODocsAsPrivate'))
|
||||||
.processor(require('./processors/filterPrivateDocs'))
|
.processor(require('./processors/filterPrivateDocs'))
|
||||||
.processor(require('./processors/computeSearchTitle'))
|
.processor(require('./processors/computeSearchTitle'))
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
/**
|
||||||
|
* Remove docs that are contained in (owned by) another doc
|
||||||
|
* so that they don't get rendered as files in themselves.
|
||||||
|
*/
|
||||||
|
module.exports = function filterContainedDocs() {
|
||||||
|
return {
|
||||||
|
docTypes: ['member', 'function-overload'],
|
||||||
|
$runAfter: ['extra-docs-added'],
|
||||||
|
$runBefore: ['computing-paths'],
|
||||||
|
$process: function(docs) {
|
||||||
|
var docTypes = this.docTypes;
|
||||||
|
return docs.filter(function(doc) {
|
||||||
|
return docTypes.indexOf(doc.docType) === -1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,7 +0,0 @@
|
||||||
module.exports = function filterMemberDocs() {
|
|
||||||
return {
|
|
||||||
$runAfter: ['extra-docs-added'], $runBefore: ['computing-paths'], $process: function(docs) {
|
|
||||||
return docs.filter(function(doc) { return doc.docType !== 'member'; });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
Loading…
Reference in New Issue