chore(doc-gen): add createDecoratorDocs processor

The createDecoratorDocs processor identifies docs of exports that actually
represent decorators and get useful information for them.

This commit also set up the rest of the generation to display these new
decorator docs with their own template and updates the API list so that
we can filter the docs by decorator docType.
This commit is contained in:
Peter Bacon Darwin
2015-12-15 10:43:43 +00:00
committed by Naomi Black
parent 9f80a27bad
commit c94ad87dd4
8 changed files with 144 additions and 1 deletions
@@ -92,6 +92,13 @@ module.exports = new Package('angular.io', [basePackage, targetPackage, cheatshe
outputPathTemplate:'${moduleDoc.moduleFolder}/${name}-${docType}.jade',
});
computePathsProcessor.pathTemplates.push({
docTypes: ['decorator'],
pathTemplate: '${moduleDoc.moduleFolder}/${name}-${docType}.html',
outputPathTemplate:'${moduleDoc.moduleFolder}/${name}-${docType}.jade',
});
computePathsProcessor.pathTemplates.push({
docTypes: ['jade-data'],
pathTemplate: '${originalDoc.moduleFolder}/_data',
@@ -0,0 +1,23 @@
{% include "lib/githubLinks.html" -%}
{% include "lib/paramList.html" -%}
{% extends 'layout/base.template.html' %}
{% block body %}
include {$ relativePath(doc.path, '_util-fns') $}
.l-main-section
h2(class="decorator export")
pre.prettyprint
code.
export {$ doc.name $}(options : {@link {$ doc.decoratorType $} {$ doc.decoratorType | escape $}}){$ returnType(doc.returnType) $}
p.location-badge.
exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }
defined in {$ githubViewLink(doc) $}
:marked
{%- if doc.notYetDocumented %}
*Not Yet Documented*
{% else %}
{$ doc.description | indentForMarkdown(4) | trimBlankLines $}
{% endif -%}
{% endblock %}