diff --git a/scripts/docs/dgeni-config.js b/scripts/docs/dgeni-config.js index a089b5eecb..2d5f4695de 100644 --- a/scripts/docs/dgeni-config.js +++ b/scripts/docs/dgeni-config.js @@ -19,6 +19,8 @@ module.exports = function(currentVersion){ .processor(require('./processors/index-page')) .processor(require('./processors/jekyll')) .processor(require('./processors/remove-private-members')) +.processor(require('./processors/hide-private-api')) + // for debugging docs // .processor(function test(){ diff --git a/scripts/docs/processors/hide-private-api.js b/scripts/docs/processors/hide-private-api.js new file mode 100644 index 0000000000..15e2b6eb27 --- /dev/null +++ b/scripts/docs/processors/hide-private-api.js @@ -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; + } + } +};