build(aio): fix up API doc-gen templates

* Remove whitespace before type specifiers
* Generate `new` and `call` member info for interfaces
* Ensure that there is no double space after class names
This commit is contained in:
Peter Bacon Darwin 2017-05-31 20:46:56 +03:00 committed by Alex Rickabaugh
parent 82ec02daf8
commit d5ce086089
5 changed files with 26 additions and 17 deletions

View File

@ -1,19 +1,29 @@
{% if doc.members.length %}
{% if doc.members.length or doc.newMember or doc.callMember %}
<section class="member-members">
<h2>Members</h2>
{% if doc.newMember %}
<div class="new-member">
<a id="{$ doc.newMember.name $}"></a>
<code-example hideCopy="true">{$ doc.newMember.name $}{$ params.paramList(doc.newMember.parameters) | trim $}{$ params.returnType(doc.newMember.returnType) $}</code-example>
{% if not doc.newMember.notYetDocumented %}{$ doc.newMember.description | marked $}{% endif %}
</div>
{% if doc.members.length or doc.callMember %}<hr>{% endif %}
{% endif %}
{% if doc.callMember %}
<div class="call-member">
<a id="{$ doc.callMember.name $}"></a>
<code-example hideCopy="true">{$ doc.callMember.name $}{$ params.paramList(doc.callMember.parameters) | trim $}{$ params.returnType(doc.callMember.returnType) $}</code-example>
{% if not doc.callMember.notYetDocumented %}{$ doc.callMember.description | marked $}{% endif %}
</div>
{% if doc.members.length %}<hr>{% endif %}
{% endif %}
{% for member in doc.members %}{% if not member.internal %}
<div class="instance-member">
<a id="{$ member.name $}"></a>
<code-example hideCopy="true">{$ member.name $}{$ params.paramList(member.parameters) | trim $}{$ params.returnType(member.returnType) $}</code-example>
{%- if not member.notYetDocumented %}
{$ member.description | marked $}
{% endif %}
{% if not member.notYetDocumented %}{$ member.description | marked $}{% endif %}
</div>
{% if not loop.last %}
<hr>
{% endif %}
{% if not loop.last %}<hr>{% endif %}
{% endif %}{% endfor %}
</section>
{% endif %}

View File

@ -4,6 +4,5 @@
{% block details %}
{% include "includes/interface-overview.html" %}
{% include "includes/description.html" %}
<!-- TODO include callMember and newMember -->
{% include "includes/members.html" %}
{% endblock %}