diff --git a/docs/template.md.ejs b/docs/template.md.ejs new file mode 100644 index 00000000..d73cd27e --- /dev/null +++ b/docs/template.md.ejs @@ -0,0 +1,101 @@ +.]/g, ""); + str = str.replace(/[^a-z0-9_-]+/gi, "-"); + str = str.toLowerCase(); + + return str; +} + +docfiles.forEach(function(doc) +{ + doc.javadoc.forEach(function(comment) + { + var tags = comment.raw.tags; + + comment.tagsByType = comment.raw.tags.reduce(function(result, tag) + { + result[tag.type] = tag; + return result; + }, {}); + + comment.ignore = "ignore" in comment.tagsByType; + + if(comment.name && !comment.ignore) + { + if(comment.isMethod || comment.isFunction) + { + var args = comment.paramTags.map(function(c) + { + return c.joinedTypes + " " + c.name; + }).join(", "); + + var returnVal = ""; + + if(comment.returnTags[0]) + { + returnVal = " -> " + comment.returnTags[0].joinedTypes; + } + comment.args = args; + comment.returnVal = returnVal; + comment.longName = comment.name + "(" + comment.args + ")" + comment.returnVal; + + ?># \n" ?> + +