/
template.md.ejs
78 lines (62 loc) · 2.3 KB
/
template.md.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<? docfiles.forEach(function(doc) { ?>
<!-- Start <?= doc.filename ?> -->
<? doc.javadoc.forEach(function(comment) { ?>
<? if (!comment.ignore) { ?>
<? if (comment.name) { ?>
<? if (comment.isMethod || comment.isFunction) { ?>
## <?= comment.name ?>(<?= comment.paramStr ?>)
<? } else { ?>
## <?= comment.name ?> <? if (comment.hasType) { ?> <?= comment.tagType ?> <? } ?>
<? } ?>
<? } ?>
<?= comment.description ?>
<? if (comment.deprecated) { ?>
**Deprecated**
<? } ?>
<? if (comment.author) { ?>
Author: <?- comment.author ?>
<? } ?>
<? if (comment.version) { ?>
Version: <?= comment.version ?>
<? } ?>
<? if (comment.see) { ?>
See: <?= comment.see ?>
<? } ?>
<? if (comment.propertyTags.length > 0) { ?>
### Properties:
<? comment.propertyTags.forEach(function(propertyTag) { ?>
* **<?= propertyTag.joinedTypes ?>** *<?= propertyTag.name ?>* <?= propertyTag.description ?><? }) ?>
<? } ?>
<? if (comment.paramTags.length > 0) { ?>
### Params:
<? comment.paramTags.forEach(function(paramTag) { ?>
*<? if (paramTag.types.length > 0) { ?> **<?= paramTag.joinedTypes ?>**<? } ?> *<?= paramTag.name ?>* <?= paramTag.description ?><? }) ?>
<? } ?>
<? if (comment.returnTags.length > 0) { ?>
### Return:
<? comment.returnTags.forEach(function(returnTag) { ?>
*<? if (returnTag.types.length > 0) { ?> **<?= returnTag.joinedTypes ?>**<? } ?> <?= returnTag.description ?>
<? }) ?>
<? } ?>
<? if (comment.fires.length > 0) { ?>
### Fires:
<? comment.fires.forEach(function(event) { ?>
* **<?= event ?>**
<? }) ?>
<? } ?>
<? if (comment.listens.length > 0) { ?>
### Listens:
<? comment.listens.forEach(function(event) { ?>
* **<?= event ?>**
<? }) ?>
<? } ?>
<? if (comment.throwsTags.length > 0) { ?>
### Throws:
<? comment.throwsTags.forEach(function(throws) { ?>
* **<?= throws.joinedTypes ?>** <?= throws.description ?>
<? }) ?>
<? } ?>
<? } ?>
<? }) ?>
<!-- End <?= doc.filename ?> -->
<? }) ?>