Created
September 23, 2016 21:41
-
-
Save ramonornela/c2b4531589ee791f956461351732f51b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function removePrivateApi() { | |
return { | |
name: 'remove-private-api', | |
description: 'Prevent the private apis from being rendered', | |
$runBefore: ['rendering-docs'], | |
$process: function(docs) { | |
console.log('Test: run hide-private'); | |
var publicDocs = []; | |
docs.forEach(function(doc){ | |
if(!doc.private){ | |
publicDocs.push(doc); | |
return doc | |
} | |
}) | |
docs = publicDocs; | |
return docs; | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment