chore(doc-gen): ignore exports marked as @private

Closes #1363
This commit is contained in:
Peter Bacon Darwin 2015-04-14 20:24:07 +01:00 committed by Misko Hevery
parent 458213d055
commit 0658d5602e
4 changed files with 16 additions and 7 deletions

View File

@ -68,6 +68,7 @@ module.exports = new Package('angular', [jsdocPackage, nunjucksPackage])
.config(function(parseTagsProcessor, getInjectables) {
parseTagsProcessor.tagDefinitions.push(require('./tag-defs/public'));
parseTagsProcessor.tagDefinitions.push(require('./tag-defs/private'));
parseTagsProcessor.tagDefinitions.push(require('./tag-defs/exportedAs'));
})

View File

@ -27,6 +27,7 @@ module.exports = function generateNavigationDoc() {
modulesDoc.value.sections.push(moduleNavItem);
_.forEach(doc.exports, function(exportDoc) {
if (!exportDoc.private) {
var exportNavItem = {
path: exportDoc.path,
partial: exportDoc.outputPath,
@ -34,6 +35,7 @@ module.exports = function generateNavigationDoc() {
type: exportDoc.docType
};
moduleNavItem.pages.push(exportNavItem);
}
});
}
});

View File

@ -0,0 +1,4 @@
module.exports = {
name: 'private',
transforms: function(doc, tag) { return true; }
};

View File

@ -9,7 +9,9 @@
<h2>Exports</h2>
<ul>
{%- for exportDoc in doc.exports %}
{% if not exportDoc.private -%}
<li><a href="/{$ exportDoc.path $}"><strong>{$ exportDoc.name $}</strong> {$ exportDoc.docType $}</a></li>
{%- endif %}
{%- endfor %}
</ul>
{% endif %}