api-builder: move templates into angular.io package

This commit is contained in:
Peter Bacon Darwin 2015-11-13 14:08:25 +00:00
parent a98085e7eb
commit 888f9ff8d8
16 changed files with 2 additions and 95 deletions

View File

@ -0,0 +1 @@
{% extends 'var.template.html' -%}

View File

@ -0,0 +1 @@
{% extends 'class.template.html' -%}

View File

@ -85,9 +85,6 @@ module.exports = new Package('angular-v2-docs', [jsdocPackage, nunjucksPackage,
variableEnd: '$}'
};
templateFinder.templateFolders
.unshift(path.resolve(__dirname, 'templates'));
templateFinder.templatePatterns = [
'${ doc.template }',
'${ doc.id }.${ doc.docType }.template.html',

View File

@ -1,44 +0,0 @@
{% include "lib/paramList.html" -%}
{% include "lib/githubLinks.html" -%}
{% extends 'layout/base.template.html' -%}
{% block body %}
<h1 class="class export">{$ doc.name $} <span class="type">{$ doc.docType $}</span></h1>
<p class="module">exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }<br/>
defined in {$ githubViewLink(doc) $}
</p>
<p>{$ doc.description | marked $}</p>
{%- if doc.decorators %}
<h2>Annotations</h2>
{%- for decorator in doc.decorators %}
<h3 class="annotation">@{$ decorator.name $}{$ paramList(decorator.arguments) $}</h3>
{% endfor %}
{% endif -%}
{%- if doc.constructorDoc or doc.members.length -%}
<h2>Members</h2>
{%- if doc.constructorDoc %}
<section class="member constructor">
<h1 id="constructor" class="name">{$ doc.constructorDoc.name $}{$ paramList(doc.constructorDoc.params) $}</h1>
{% marked %}
{$ doc.constructorDoc.description $}
{% endmarked %}
</section>
{% endif -%}
{%- for member in doc.members %}{% if not member.internal %}
<section class="member">
<h1 id="{$ member.name $}" class="name">
{$ member.name $}{% if member.optional %}?{% endif %}{$ paramList(member.params) $}
</h1>
{% marked %}
{$ member.description $}
{% endmarked %}
</section>
{% endif %}{% endfor %}
{%- endif -%}
{% endblock %}

View File

@ -1,9 +0,0 @@
{% extends 'layout/base.template.html' %}
{% block body %}
<h1>{$ doc.id $}</h1>
<h2>({$ doc.docType $})</h2>
<div>
{$ doc.description | marked $}
</div>
{% endblock %}

View File

@ -1 +0,0 @@
{% extends 'var.template.html' -%}

View File

@ -1,3 +0,0 @@
angular.module('{$ doc.moduleName $}', [])
.value('{$ doc.serviceName $}', {$ doc.value | json $});

View File

@ -1,11 +0,0 @@
{% include "lib/paramList.html" -%}
{% include "lib/githubLinks.html" -%}
{% extends 'layout/base.template.html' -%}
{% block body %}
<h1 class="function export">{$ doc.name $}{$ paramList(doc.parameters) $}</h1>
<p class="module">exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }<br/>
defined in {$ githubViewLink(doc) $}</p>
<p>{$ doc.description | marked $}</p>
{% endblock %}

View File

@ -1,5 +0,0 @@
{% extends 'layout/base.template.html' %}
{% block body %}
{$ doc.description | marked $}
{% endblock %}

View File

@ -1 +0,0 @@
{% extends 'class.template.html' -%}

View File

@ -1 +0,0 @@
{% block body %}{% endblock %}

View File

@ -1,7 +0,0 @@
{% macro paramList(params) -%}
{%- if params -%}<span class="params">(
{%- for param in params -%}
<span class="param">{$ param | escape $}{% if not loop.last %}, {% endif %}</span>
{%- endfor %})</span>
{%- endif %}
{%- endmacro -%}

View File

@ -1,10 +0,0 @@
{% include "lib/githubLinks.html" -%}
{% extends 'layout/base.template.html' %}
{% block body %}
<h1>{$ doc.name $} <span class="type">variable</span></h1>
<p class="module">exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} }<br/>
defined in {$ githubViewLink(doc) $}</p>
<p>{$ doc.description | marked $}</p>
{% endblock %}