chore(doc-gen): include static members in the class template

Closes #761
This commit is contained in:
Peter Bacon Darwin 2016-01-28 10:51:54 +00:00
parent 02e2b7b866
commit 12e989da08
2 changed files with 26 additions and 2 deletions

View File

@ -53,9 +53,29 @@ p.location-badge.
{% endif -%}
{% endif %}
{% if doc.statics.length -%}
.l-main-section
h2 Static Members
{%- for member in doc.statics %}{% if not member.internal %}
.l-sub-section
h3#{$ member.name | toId $}
pre.prettyprint
code.
{$ member.name $}{$ paramList(member.parameters) | indent(8, false) | trim $}{$ returnType(member.returnType) $}
:marked
{%- if member.notYetDocumented %}
*Not Yet Documented*
{% else %}
{$ member.description | indentForMarkdown(6) | replace('## Example', '') | replace('# Example', '') | trimBlankLines $}
{% endif %}
{% endif %}{% endfor %}
{%- endif -%}
{% if doc.members.length -%}
.l-main-section
h2 Members
h2 Instance Members
{%- for member in doc.members %}{% if not member.internal %}
.l-sub-section
h3#{$ member.name | toId $}

View File

@ -132,8 +132,12 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
if (a.name < b.name) return -1;
return 0;
});
exportDoc.statics.sort(function(a, b) {
if (a.name > b.name) return 1;
if (a.name < b.name) return -1;
return 0;
});
}
});
});
}