docs(api): do not generate files for private classes

Closes #684
This commit is contained in:
Drew Rygh
2015-12-02 13:32:59 -06:00
parent 50fab2504b
commit 160cc70332
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,18 @@
module.exports = function removePrivateApi() {
return {
name: 'remove-private-api',
description: 'Prevent the private apis from being rendered',
$runBefore: ['rendering-docs'],
$process: function(docs) {
var publicDocs = [];
docs.forEach(function(doc){
if(!doc.private){
publicDocs.push(doc);
return doc
}
})
docs = publicDocs;
return docs;
}
}
};