@minecraft/markup-generators-plugin 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.json +26 -0
  2. package/CHANGELOG.md +14 -0
  3. package/README.md +17 -0
  4. package/lib/generators/ChangelogJSONGenerator.d.ts +7 -0
  5. package/lib/generators/ChangelogJSONGenerator.js +46 -0
  6. package/lib/generators/ChangelogJSONGenerator.js.map +1 -0
  7. package/lib/generators/ChangelogMDGenerator.d.ts +9 -0
  8. package/lib/generators/ChangelogMDGenerator.js +54 -0
  9. package/lib/generators/ChangelogMDGenerator.js.map +1 -0
  10. package/lib/generators/MSDocsMarkdownGenerator.d.ts +26 -0
  11. package/lib/generators/MSDocsMarkdownGenerator.js +434 -0
  12. package/lib/generators/MSDocsMarkdownGenerator.js.map +1 -0
  13. package/lib/generators/NPMModuleGenerator.d.ts +10 -0
  14. package/lib/generators/NPMModuleGenerator.js +176 -0
  15. package/lib/generators/NPMModuleGenerator.js.map +1 -0
  16. package/lib/generators/TypeDocGenerator.d.ts +8 -0
  17. package/lib/generators/TypeDocGenerator.js +123 -0
  18. package/lib/generators/TypeDocGenerator.js.map +1 -0
  19. package/lib/generators/TypeScriptDefinitionGenerator.d.ts +9 -0
  20. package/lib/generators/TypeScriptDefinitionGenerator.js +64 -0
  21. package/lib/generators/TypeScriptDefinitionGenerator.js.map +1 -0
  22. package/lib/generators/TypeScriptGenerator.d.ts +10 -0
  23. package/lib/generators/TypeScriptGenerator.js +128 -0
  24. package/lib/generators/TypeScriptGenerator.js.map +1 -0
  25. package/lib/generators/index.d.ts +7 -0
  26. package/lib/generators/index.js +26 -0
  27. package/lib/generators/index.js.map +1 -0
  28. package/lib/index.d.ts +3 -0
  29. package/lib/index.js +30 -0
  30. package/lib/index.js.map +1 -0
  31. package/lib/msdocsGeneratorUnitTests.spec.d.ts +1 -0
  32. package/lib/msdocsGeneratorUnitTests.spec.js +67 -0
  33. package/lib/msdocsGeneratorUnitTests.spec.js.map +1 -0
  34. package/package.json +66 -0
  35. package/templates/msdocs/blocks/block.mustache +18 -0
  36. package/templates/msdocs/blocks/block_property.mustache +26 -0
  37. package/templates/msdocs/blocks/default_metadata.mustache +4 -0
  38. package/templates/msdocs/commands/command.mustache +52 -0
  39. package/templates/msdocs/commands/default_metadata.mustache +4 -0
  40. package/templates/msdocs/commands/enum.mustache +25 -0
  41. package/templates/msdocs/commands/inline_enum.mustache +15 -0
  42. package/templates/msdocs/commands/overload.mustache +11 -0
  43. package/templates/msdocs/commands/parameter.mustache +1 -0
  44. package/templates/msdocs/commands/summary.mustache +21 -0
  45. package/templates/msdocs/commands/toc.mustache +6 -0
  46. package/templates/msdocs/script/class.mustache +162 -0
  47. package/templates/msdocs/script/default_metadata.mustache +5 -0
  48. package/templates/msdocs/script/enum.mustache +39 -0
  49. package/templates/msdocs/script/examples.mustache +15 -0
  50. package/templates/msdocs/script/function.mustache +95 -0
  51. package/templates/msdocs/script/module.mustache +139 -0
  52. package/templates/msdocs/script/module_changelog.mustache +235 -0
  53. package/templates/msdocs/script/property.mustache +81 -0
  54. package/templates/msdocs/script/property_declaration.mustache +6 -0
  55. package/templates/msdocs/script/toc.mustache +24 -0
  56. package/templates/msdocs/script/type_alias.mustache +56 -0
  57. package/templates/msdocs/script/type_with_links.mustache +1 -0
  58. package/templates/msdocs/script/value.mustache +1 -0
  59. package/templates/npm/README.md.mustache +13 -0
  60. package/templates/npm/package.json.mustache +30 -0
  61. package/templates/npm/vanilla-data/README.md +3 -0
  62. package/templates/npm/vanilla-data/bundle.js.mustache +10 -0
  63. package/templates/npm/vanilla-data/data-package.json.mustache +22 -0
  64. package/templates/npm/vanilla-data/index.ts.mustache +3 -0
  65. package/templates/npm/vanilla-data/template.npmignore +1 -0
  66. package/templates/npm/vanilla-data/tsconfig.json +18 -0
  67. package/templates/ts/data_items_enum.mustache +13 -0
  68. package/templates/ts/module.mustache +5 -0
  69. package/templates/ts/module_header.mustache +9 -0
  70. package/templates/ts/state_mapping.mustache +50 -0
  71. package/templates/tsdef/class.mustache +86 -0
  72. package/templates/tsdef/enum.mustache +32 -0
  73. package/templates/tsdef/examples.mustache +10 -0
  74. package/templates/tsdef/function.mustache +98 -0
  75. package/templates/tsdef/function_argument_declaration.mustache +1 -0
  76. package/templates/tsdef/function_declaration.mustache +1 -0
  77. package/templates/tsdef/module.mustache +63 -0
  78. package/templates/tsdef/module_header.mustache +8 -0
  79. package/templates/tsdef/property.mustache +99 -0
  80. package/templates/tsdef/property_declaration.mustache +1 -0
  81. package/templates/tsdef/type.mustache +1 -0
  82. package/templates/tsdef/type_alias.mustache +37 -0
  83. package/templates/tsdef/value.mustache +1 -0
  84. package/templates/txt/md_changelog.mustache +247 -0
@@ -0,0 +1,247 @@
1
+ `{{{name}}}`
2
+
3
+ {{#changelog.length}}
4
+ == Change Log ==
5
+ {{#changelog}}
6
+ === {{{version}}} ===
7
+ {{#$added}}
8
+ - Added `{{{name}}}` module
9
+ {{/$added}}
10
+ {{#classes}}
11
+ {{#$added}}
12
+ - Added class `{{{name}}}`
13
+ ```ts
14
+ {{> class}}
15
+
16
+ ```
17
+ {{/$added}}
18
+ {{#$removed}}
19
+ - Removed class `{{{name}}}`
20
+ {{/$removed}}
21
+ {{#has_changes}}{{^$added}}{{^$removed}}
22
+ - Changed class `{{{name}}}`
23
+ {{#base_types}}
24
+ {{#$added}}
25
+ - Added base class `*{{> type}}*`
26
+ {{/$added}}
27
+ {{#$removed}}
28
+ - Removed base class `*{{{name}}}*`
29
+ {{/$removed}}
30
+ {{/base_types}}
31
+ {{#properties}}
32
+ {{#$added}}
33
+ - Added property `{{{name}}}`
34
+ {{/$added}}
35
+ {{#$removed}}
36
+ - Removed property `{{{name}}}`
37
+ {{/$removed}}
38
+ {{#is_read_only}}
39
+ {{#$changed}}
40
+ - Changed read-only flag for `{{{name}}}` from `{{{$old}}}` to `{{{$new}}}`
41
+ {{/$changed}}
42
+ {{/is_read_only}}
43
+ {{#type}}
44
+ {{#$changed}}
45
+ - Changed type for `{{{name}}}` from {{#$old.type}}`*{{> type}}*`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$old.type}} to {{#$new.type}}`*{{> type}}*`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$new.type}}
46
+ {{/$changed}}
47
+ {{/type}}
48
+ {{/properties}}
49
+ {{#has_member_constants}}
50
+ {{#constants}}
51
+ {{#$added}}
52
+ - Added constant `{{{name}}}`
53
+ {{/$added}}
54
+ {{#$removed}}
55
+ - Removed constant `{{{name}}}`
56
+ {{/$removed}}
57
+ {{#value}}
58
+ {{#$changed}}
59
+ - Changed constant `{{{name}}}` value from `{{value.$old}}` to `{{value.$new}}`
60
+ {{/$changed}}
61
+ {{/value}}
62
+ {{/constants}}
63
+ {{/has_member_constants}}
64
+ {{#has_member_functions}}
65
+ {{#functions}}
66
+ {{#$added}}
67
+ - Added function `{{{name}}}`
68
+ {{/$added}}
69
+ {{#$removed}}
70
+ - Removed function `{{{name}}}`
71
+ {{/$removed}}
72
+ {{#has_changes}}{{^$added}}{{^$removed}}
73
+ - Changed function `{{{name}}}`
74
+ {{#return_type}}
75
+ {{#$changed}}
76
+ - Changed return type from {{#$old.return_type}}`*{{> type}}*`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$old.return_type}} to {{#$new.return_type}}`*{{> type}}*`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$new.return_type}}
77
+ {{/$changed}}
78
+ {{/return_type}}
79
+ {{#arguments}}
80
+ {{#$added}}
81
+ - Added argument `{{{name}}}`
82
+ {{/$added}}
83
+ {{#$removed}}
84
+ - Removed argument `{{{name}}}`
85
+ {{/$removed}}
86
+ {{#type}}{{^$added}}{{^$removed}}
87
+ {{#$changed}}
88
+ - Changed argument `{{{name}}}` type from {{#$old.type}}`*{{> type}}*`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$old.type}} to {{#$new.type}}`*{{> type}}*`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$new.type}}
89
+ {{/$changed}}
90
+ {{/$removed}}{{/$added}}{{/type}}
91
+ {{/arguments}}
92
+ {{/$removed}}{{/$added}}{{/has_changes}}
93
+ {{/functions}}
94
+ {{/has_member_functions}}
95
+ {{/$removed}}{{/$added}}{{/has_changes}}
96
+ {{/classes}}
97
+ {{#interfaces}}
98
+ {{#$added}}
99
+ - Added interface `{{{name}}}`
100
+ ```ts
101
+ {{> class}}
102
+
103
+ ```
104
+ {{/$added}}
105
+ {{#$removed}}
106
+ - Removed interface `{{{name}}}`
107
+ {{/$removed}}
108
+ {{#has_changes}}{{^$added}}{{^$removed}}
109
+ - Changed interface `{{{name}}}`
110
+ {{#properties}}
111
+ {{#$added}}
112
+ - Added property `{{{name}}}`
113
+ ```ts
114
+ {{> property_declaration}}
115
+
116
+ ```
117
+ {{/$added}}
118
+ {{#$removed}}
119
+ - Removed property `{{{name}}}`
120
+ {{/$removed}}
121
+ {{#is_read_only}}
122
+ {{#$changed}}
123
+ - Changed read-only flag for `{{{name}}}` from `{{{$old}}}` to `{{{$new}}}`
124
+ {{/$changed}}
125
+ {{/is_read_only}}
126
+ {{#type}}
127
+ {{#$changed}}
128
+ - Changed type for `{{{name}}}` from {{#$old.type}}`{{> raw_type}}`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$old.type}} to {{#$new.type}}`{{> raw_type}}`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$new.type}}
129
+ - New Signature: {{#$new}}`{{> property_declaration}}`{{/$new}}
130
+ - Old Signature: {{#$old}}`{{> property_declaration}}`{{/$old}}
131
+ {{/$changed}}
132
+ {{/type}}
133
+ {{/properties}}
134
+ {{/$removed}}{{/$added}}{{/has_changes}}
135
+ {{/interfaces}}
136
+ {{#functions}}
137
+ {{#$added}}
138
+ - Added function `{{{name}}}`
139
+ {{/$added}}
140
+ {{#$removed}}
141
+ - Removed function `{{{name}}}`
142
+ {{/$removed}}
143
+ {{#has_changes}}{{^$added}}{{^$removed}}
144
+ - Changed function `{{{name}}}`
145
+ {{#return_type}}
146
+ {{#$changed}}
147
+ - Changed return type from {{#$old.return_type}}`*{{> type}}*`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$old.return_type}} to {{#$new.return_type}}`*{{> type}}*`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$new.return_type}}
148
+ {{/$changed}}
149
+ {{/return_type}}
150
+ {{#arguments}}
151
+ {{#$added}}
152
+ - Added argument `{{{name}}}`
153
+ {{/$added}}
154
+ {{#$removed}}
155
+ - Removed argument `{{{name}}}`
156
+ {{/$removed}}
157
+ {{#type}}{{^$added}}{{^$removed}}
158
+ {{#$changed}}
159
+ - Changed argument `{{{name}}}` type from {{#$old.type}}`*{{> type}}*`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$old.type}} to {{#$new.type}}`*{{> type}}*`{{#is_errorable}} (throws exceptions){{/is_errorable}}{{/$new.type}}
160
+ {{/$changed}}
161
+ {{/$removed}}{{/$added}}{{/type}}
162
+ {{/arguments}}
163
+ {{/$removed}}{{/$added}}{{/has_changes}}
164
+ {{/functions}}
165
+ {{#enums}}
166
+ {{#$added}}
167
+ - Added enum `{{{name}}}`
168
+ {{/$added}}
169
+ {{#$removed}}
170
+ - Removed enum `{{{name}}}`
171
+ {{/$removed}}
172
+ {{/enums}}
173
+ {{#objects}}
174
+ {{#$added}}
175
+ - Added object `{{{name}}}`
176
+ {{/$added}}
177
+ {{#$removed}}
178
+ - Removed object `{{{name}}}`
179
+ {{/$removed}}
180
+ {{#type}}
181
+ {{#$changed}}
182
+ - Changed type for object `{{{name}}}` from {{#$old.type}}`*{{> type}}*`{{/$old.type}} to {{#$new.type}}`*{{> type}}*`{{/$new.type}}
183
+ {{/$changed}}
184
+ {{/type}}
185
+ {{/objects}}
186
+ {{#constants}}
187
+ {{#$added}}
188
+ - Added constant `{{{name}}}`
189
+ {{/$added}}
190
+ {{#$removed}}
191
+ - Removed constant `{{{name}}}`
192
+ {{/$removed}}
193
+ {{#value}}
194
+ {{#$changed}}
195
+ - Changed constant `{{{name}}}` value from `{{value.$old}}` to `{{value.$new}}`
196
+ {{/$changed}}
197
+ {{/value}}
198
+ {{/constants}}
199
+ {{#type_aliases}}
200
+ {{#$added}}
201
+ - Added type {{#is_type_map}}map{{/is_type_map}}{{^is_type_map}}alias{{/is_type_map}} `{{{name}}}`
202
+ ```ts
203
+ {{> type_alias }}
204
+ ```
205
+ {{/$added}}
206
+ {{#$removed}}
207
+ - Removed type {{#is_type_map}}map{{/is_type_map}}{{^is_type_map}}alias{{/is_type_map}} `{{{name}}}`
208
+ {{/$removed}}
209
+ {{#has_changes}}{{^$added}}{{^$removed}}
210
+ {{#is_script_generated}}
211
+ {{#type}}
212
+ {{#$changed}}
213
+ - Changed type alias `{{{name}}}` from:
214
+ ```ts
215
+ {{{$old.type.name}}}
216
+ ```
217
+ to:
218
+ ```ts
219
+ {{{$new.type.name}}}
220
+ ```
221
+ {{/$changed}}
222
+ {{/type}}
223
+ {{/is_script_generated}}
224
+ {{#is_type_map}}
225
+ - Changed type map `{{{name}}}`
226
+ {{#mappings}}
227
+ {{#$added}}
228
+ - Added mapping `'{{{name}}}': '{{{value}}}'`
229
+ {{/$added}}
230
+ {{#$removed}}
231
+ - Removed mapping `'{{{name}}}': '{{{value}}}'`
232
+ {{/$removed}}
233
+ {{#has_changes}}{{^$added}}{{^$removed}}
234
+ {{#value}}
235
+ {{#$changed}}
236
+ - Changed mapping `{{{name}}}` from `{{{$old}}}` to `{{{$new}}}`
237
+ {{/$changed}}
238
+ {{/value}}
239
+ {{/$removed}}{{/$added}}{{/has_changes}}
240
+ {{/mappings}}
241
+ {{/is_type_map}}
242
+ {{/$removed}}{{/$added}}{{/has_changes}}
243
+ {{/type_aliases}}
244
+
245
+ {{/changelog}}
246
+ {{/changelog.length}}
247
+ == /Change Log ==