chore(docs): cleanup + es6

This commit is contained in:
Ibby
2017-03-23 22:07:59 -04:00
parent cd5ff68bc1
commit ead99b1a4f
24 changed files with 321 additions and 656 deletions
+3 -12
View File
@@ -1,18 +1,9 @@
"use strict";
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 && (!doc.tags || !doc.tags.tagsByName.get('hidden'))){
publicDocs.push(doc);
return doc
}
});
docs = publicDocs;
return docs;
}
}
$process: docs => docs.filter(doc => !doc.private && (!doc.tags || !doc.tags.tagsByName.get('hidden')))
};
};