diff --git a/res/jsDoc.ejs b/res/jsDoc.ejs index 68c71c2..ffa0798 100644 --- a/res/jsDoc.ejs +++ b/res/jsDoc.ejs @@ -9,7 +9,10 @@ <% if(tags.length){ - var hasParams = false, hasReturn = false, hasType = false; -%> + var hasParams = false, hasReturn = false, hasType = false, + hasTypedef = false, typedefName = null, + hasProperties = false; -%> +
<% tags.forEach(function(tag){ @@ -30,7 +33,39 @@ if(tags.length){
<% } - if(tag.type == 'return'){ + if(tag.type == 'typedef'){ -%> +
Type Definition
+
+<% typedefName = tag.string.replace(/\{([^\}]*)\}/g, ""); -%> +<%= typedefName %> +<% (tag.types || []).forEach(function(type){ -%> +<%= type %> +<% }); + + if(tag.description){ -%> +<%- md(tag.description, true) %> +<% } -%> +
+<% } + + if(tag.type == 'property'){ + if(!hasProperties){ + hasProperties = true; -%> +
Properties
+<% } -%> +
+<%= tag.name %> +<% (tag.types || []).forEach(function(type){ -%> +<%= type %> +<% }); + + if(tag.description){ -%> +<%- md(tag.description, true) %> +<% } -%> +
+<% } + + if(tag.type == 'return' || tag.type == 'returns'){ if(!hasReturn){ hasReturn = true; -%>
Returns