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) { .config(function(parseTagsProcessor, getInjectables) {
parseTagsProcessor.tagDefinitions.push(require('./tag-defs/public')); parseTagsProcessor.tagDefinitions.push(require('./tag-defs/public'));
parseTagsProcessor.tagDefinitions.push(require('./tag-defs/private'));
parseTagsProcessor.tagDefinitions.push(require('./tag-defs/exportedAs')); parseTagsProcessor.tagDefinitions.push(require('./tag-defs/exportedAs'));
}) })

View File

@ -27,13 +27,15 @@ module.exports = function generateNavigationDoc() {
modulesDoc.value.sections.push(moduleNavItem); modulesDoc.value.sections.push(moduleNavItem);
_.forEach(doc.exports, function(exportDoc) { _.forEach(doc.exports, function(exportDoc) {
var exportNavItem = { if (!exportDoc.private) {
path: exportDoc.path, var exportNavItem = {
partial: exportDoc.outputPath, path: exportDoc.path,
name: exportDoc.name, partial: exportDoc.outputPath,
type: exportDoc.docType name: exportDoc.name,
}; type: exportDoc.docType
moduleNavItem.pages.push(exportNavItem); };
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> <h2>Exports</h2>
<ul> <ul>
{%- for exportDoc in doc.exports %} {%- for exportDoc in doc.exports %}
{% if not exportDoc.private -%}
<li><a href="/{$ exportDoc.path $}"><strong>{$ exportDoc.name $}</strong> {$ exportDoc.docType $}</a></li> <li><a href="/{$ exportDoc.path $}"><strong>{$ exportDoc.name $}</strong> {$ exportDoc.docType $}</a></li>
{%- endif %}
{%- endfor %} {%- endfor %}
</ul> </ul>
{% endif %} {% endif %}