@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,26 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ __exportStar(require("./ChangelogJSONGenerator"), exports);
20
+ __exportStar(require("./ChangelogMDGenerator"), exports);
21
+ __exportStar(require("./MSDocsMarkdownGenerator"), exports);
22
+ __exportStar(require("./NPMModuleGenerator"), exports);
23
+ __exportStar(require("./TypeDocGenerator"), exports);
24
+ __exportStar(require("./TypeScriptDefinitionGenerator"), exports);
25
+ __exportStar(require("./TypeScriptGenerator"), exports);
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generators/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;;;;;;;AAElC,2DAAyC;AACzC,yDAAuC;AACvC,4DAA0C;AAC1C,uDAAqC;AACrC,qDAAmC;AACnC,kEAAgD;AAChD,wDAAsC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { Plugin } from '@minecraft/api-docs-generator';
2
+ declare const MarkupGeneratorsPlugin: Plugin;
3
+ export default MarkupGeneratorsPlugin;
package/lib/index.js ADDED
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ var __importDefault = (this && this.__importDefault) || function (mod) {
5
+ return (mod && mod.__esModule) ? mod : { "default": mod };
6
+ };
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const path_1 = __importDefault(require("path"));
9
+ const generators_1 = require("./generators");
10
+ const templatesRoot = path_1.default.resolve(__dirname, '..', 'templates');
11
+ const MarkupGeneratorsPlugin = {
12
+ generators: [
13
+ new generators_1.ChangelogJSONGenerator(),
14
+ new generators_1.ChangelogMDGenerator(),
15
+ new generators_1.MSDocsMarkdownGenerator(),
16
+ new generators_1.NPMModuleGenerator(),
17
+ new generators_1.TypeDocGenerator(),
18
+ new generators_1.TypeScriptDefinitionGenerator(),
19
+ new generators_1.TypeScriptGenerator(),
20
+ ],
21
+ templates: {
22
+ msdocs: path_1.default.join(templatesRoot, 'msdocs'),
23
+ npm: path_1.default.join(templatesRoot, 'npm'),
24
+ ts: path_1.default.join(templatesRoot, 'ts'),
25
+ tsdef: path_1.default.join(templatesRoot, 'tsdef'),
26
+ txt: path_1.default.join(templatesRoot, 'txt'),
27
+ },
28
+ };
29
+ exports.default = MarkupGeneratorsPlugin;
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;;AAElC,gDAAwB;AAIxB,6CAQsB;AAEtB,MAAM,aAAa,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AAEjE,MAAM,sBAAsB,GAAW;IACnC,UAAU,EAAE;QACR,IAAI,mCAAsB,EAAE;QAC5B,IAAI,iCAAoB,EAAE;QAC1B,IAAI,oCAAuB,EAAE;QAC7B,IAAI,+BAAkB,EAAE;QACxB,IAAI,6BAAgB,EAAE;QACtB,IAAI,0CAA6B,EAAE;QACnC,IAAI,gCAAmB,EAAE;KAC5B;IACD,SAAS,EAAE;QACP,MAAM,EAAE,cAAI,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;QAC1C,GAAG,EAAE,cAAI,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC;QACpC,EAAE,EAAE,cAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC;QAClC,KAAK,EAAE,cAAI,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC;QACxC,GAAG,EAAE,cAAI,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC;KACvC;CACJ,CAAC;AAEF,kBAAe,sBAAsB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const vitest_1 = require("vitest");
6
+ const api_docs_generator_1 = require("@minecraft/api-docs-generator");
7
+ const generators_1 = require("./generators");
8
+ (0, vitest_1.describe)('MSDocsMarkdownGenerator Unit Tests', () => {
9
+ (0, vitest_1.it)('Returns correctly sorted modules', () => {
10
+ const gen = new generators_1.MSDocsMarkdownGenerator();
11
+ const release = new api_docs_generator_1.MinecraftRelease('0.1.0');
12
+ const makeServerType = (version) => {
13
+ const module_type = 'script';
14
+ return {
15
+ name: '@minecraft/server',
16
+ uuid: '1234',
17
+ version: version,
18
+ minecraft_version: '0.1.0',
19
+ module_type: module_type,
20
+ };
21
+ };
22
+ const makeServerUIType = (version) => {
23
+ const module_type = 'script';
24
+ return {
25
+ name: '@minecraft/server-ui',
26
+ uuid: '12345',
27
+ version: version,
28
+ minecraft_version: '0.1.0',
29
+ module_type: module_type,
30
+ };
31
+ };
32
+ release.script_modules = [
33
+ makeServerType('1.0.0'),
34
+ makeServerType('1.3.0'),
35
+ makeServerType('1.4.0'),
36
+ makeServerUIType('2.0.0'),
37
+ makeServerUIType('2.1.0'),
38
+ makeServerUIType('2.2.0'),
39
+ makeServerUIType('3.0.0'),
40
+ makeServerUIType('3.1.0-beta'),
41
+ makeServerType('1.1.0'),
42
+ makeServerType('2.0.0'),
43
+ makeServerType('2.1.0'),
44
+ makeServerType('3.0.0'),
45
+ makeServerType('3.1.0'),
46
+ makeServerType('3.2.0-beta'),
47
+ makeServerUIType('1.0.0'),
48
+ makeServerUIType('1.1.0'),
49
+ ];
50
+ const { latest, prior } = gen.getSortedModules(release);
51
+ (0, vitest_1.expect)(latest.length).toEqual(2);
52
+ (0, vitest_1.expect)(latest[0].name).toEqual('@minecraft/server');
53
+ (0, vitest_1.expect)(latest[0].version).toEqual('3.2.0-beta');
54
+ (0, vitest_1.expect)(latest[1].name).toEqual('@minecraft/server-ui');
55
+ (0, vitest_1.expect)(latest[1].version).toEqual('3.1.0-beta');
56
+ (0, vitest_1.expect)(prior.length).toEqual(4);
57
+ (0, vitest_1.expect)(prior[0].name).toEqual('@minecraft/server');
58
+ (0, vitest_1.expect)(prior[0].version).toEqual('2.1.0');
59
+ (0, vitest_1.expect)(prior[1].name).toEqual('@minecraft/server');
60
+ (0, vitest_1.expect)(prior[1].version).toEqual('1.4.0');
61
+ (0, vitest_1.expect)(prior[2].name).toEqual('@minecraft/server-ui');
62
+ (0, vitest_1.expect)(prior[2].version).toEqual('2.2.0');
63
+ (0, vitest_1.expect)(prior[3].name).toEqual('@minecraft/server-ui');
64
+ (0, vitest_1.expect)(prior[3].version).toEqual('1.1.0');
65
+ });
66
+ });
67
+ //# sourceMappingURL=msdocsGeneratorUnitTests.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msdocsGeneratorUnitTests.spec.js","sourceRoot":"","sources":["../src/msdocsGeneratorUnitTests.spec.ts"],"names":[],"mappings":"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"}
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@minecraft/markup-generators-plugin",
3
+ "version": "1.0.0",
4
+ "description": "Plugin for @minecraft/api-docs-generator containing core markup generators and template files",
5
+ "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
7
+ "author": "Jake Shirley (jashir@mojang.com)",
8
+ "contributors": [
9
+ {
10
+ "name": "Raphael Landaverde",
11
+ "email": "rlanda@microsoft.com"
12
+ },
13
+ {
14
+ "name": "Zach Campbell",
15
+ "email": "zachary.campbell@skyboxlabs.com"
16
+ }
17
+ ],
18
+ "license": "MIT",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/Mojang/minecraft-scripting-libraries.git",
22
+ "directory": "tools/markup-generators-plugin"
23
+ },
24
+ "engines": {
25
+ "node": ">=22.0.0"
26
+ },
27
+ "scripts": {
28
+ "build": "just build",
29
+ "clean": "just clean",
30
+ "lint": "just lint",
31
+ "test": "just test",
32
+ "package": "just package",
33
+ "postpublish": "just postpublish"
34
+ },
35
+ "files": [
36
+ "lib/",
37
+ "!lib/**/*.{spec,test}.ts",
38
+ "templates/",
39
+ "README.md",
40
+ "CHANGELOG.*"
41
+ ],
42
+ "devDependencies": {
43
+ "@minecraft/api-docs-generator": "^1.0.0",
44
+ "@minecraft/core-build-tasks": "*",
45
+ "@types/mustache": "^4.2.2",
46
+ "@types/node": "^22.0.0",
47
+ "@types/semver": "^7.3.12",
48
+ "eslint": "^9.17.0",
49
+ "eslint-config-minecraft-scripting": "*",
50
+ "just-scripts": "^2.3.3",
51
+ "ts-node": "^10.9.2",
52
+ "vitest": "^3.0.8"
53
+ },
54
+ "dependencies": {
55
+ "@rushstack/node-core-library": "^5.13.0",
56
+ "esbuild": "^0.25.0",
57
+ "mustache": "^4.2.0",
58
+ "prettier": "^3.5.3",
59
+ "semver": "^7.3.5",
60
+ "typedoc": "~0.26.11",
61
+ "typescript": "~5.6.0"
62
+ },
63
+ "peerDependencies": {
64
+ "@minecraft/api-docs-generator": "^1.0.0"
65
+ }
66
+ }
@@ -0,0 +1,18 @@
1
+ ---
2
+ {{ >default_metadata }}
3
+ title: {{{block_name}}} Block
4
+ description: Description of the {{{block_name}}} block
5
+ ---
6
+ # {{{block_name}}} Block
7
+ {{#block_description}}
8
+ {{{.}}}
9
+
10
+ {{/block_description}}
11
+ ## Properties:
12
+ {{#properties}}
13
+ * {{{name}}}
14
+ {{#property_description}}
15
+ {{{.}}}
16
+
17
+ {{/property_description}}
18
+ {{/properties}}
@@ -0,0 +1,26 @@
1
+ ---
2
+ {{ >default_metadata }}
3
+ title: {{{property_name}}} Block Property
4
+ description: Description and usage of the {{{property_name}}} block property
5
+ ---
6
+ # {{{property_name}}} Block Property
7
+ {{#property_description}}
8
+ {{{.}}}
9
+
10
+ {{/property_description}}
11
+ {{^int_value_display_as_range}}
12
+ ## Values:
13
+ Type: {{{type}}}
14
+
15
+ {{#values}}
16
+ * {{{value}}}
17
+ {{#value_description}}
18
+ {{{.}}}
19
+
20
+ {{/value_description}}
21
+ {{/values}}
22
+ {{/int_value_display_as_range}}
23
+ {{#int_value_display_as_range}}
24
+ Value Type: int
25
+ Value Range: {{{min_value}}} - {{{max_value}}}
26
+ {{/int_value_display_as_range}}
@@ -0,0 +1,4 @@
1
+ # DO NOT TOUCH — This file was automatically generated by @minecraft/api-docs-generator, to report problems file an issue at https://github.com/Mojang/minecraft-scripting-libraries
2
+ author: jakeshirley
3
+ ms.author: jashir
4
+ ms.service: minecraft-bedrock-edition
@@ -0,0 +1,52 @@
1
+ ---
2
+ {{ >default_metadata }}
3
+ title: {{{command_name}}} Command
4
+ description: Description and usage of the {{{command_name}}} command
5
+ ---
6
+ # `/{{{command_name}}}` Command
7
+ {{#command_description}}
8
+ {{{.}}}
9
+
10
+ {{/command_description}}
11
+ {{^command_description}}
12
+ {{{description}}}
13
+
14
+ {{/command_description}}
15
+ <table>
16
+ {{#aliases.length}}
17
+ <tr>
18
+ <th>Aliases</th>
19
+ <td>{{#aliases}}/{{{name}}}{{^is_last}}, {{/is_last}}{{/aliases}}</td>
20
+ </tr>
21
+ {{/aliases.length}}
22
+ <tr>
23
+ <th>Permission Level</th>
24
+ <td>{{permission_level_name}}</td>
25
+ </tr>
26
+ <tr>
27
+ <th>Requires Cheats?</th>
28
+ <td>{{#requires_cheats}}Yes{{/requires_cheats}}{{^requires_cheats}}No{{/requires_cheats}}</td>
29
+ </tr>
30
+ </table>
31
+
32
+ ## Usage
33
+ {{#overloads}}
34
+ {{> overload}}
35
+ {{/overloads}}
36
+ {{#arguments.length}}
37
+
38
+ ## Arguments
39
+ {{#arguments}}
40
+ - `{{{param_name}}}{{#type.syntax}}: {{{.}}}{{/type.syntax}}`: {{#type.has_link}}[{{{type.name}}}]{{#type.is_enum}}(../enums/{{{type.name}}}.md){{/type.is_enum}}{{^type.is_enum}}(../types/{{{type.name}}}.md){{/type.is_enum}}{{/type.has_link}}{{^type.has_link}}{{{type.name}}}{{/type.has_link}}
41
+ {{#argument_description}}
42
+ {{{.}}}
43
+ {{/argument_description}}
44
+ {{/arguments}}
45
+ {{/arguments.length}}
46
+ {{#command_enums.length}}
47
+
48
+ ## Enums
49
+ {{#command_enums}}
50
+ {{> inline_enum}}
51
+ {{/command_enums}}
52
+ {{/command_enums.length}}
@@ -0,0 +1,4 @@
1
+ # DO NOT TOUCH — This file was automatically generated by @minecraft/api-docs-generator, to report problems file an issue at https://github.com/Mojang/minecraft-scripting-libraries
2
+ author: jakeshirley
3
+ ms.author: jashir
4
+ ms.service: minecraft-bedrock-edition
@@ -0,0 +1,25 @@
1
+ ---
2
+ {{ >default_metadata }}
3
+ title: {{{enum_name}}} Enum
4
+ description: Description and values of the {{{enum_name}}} enum
5
+ ---
6
+ # `{{{enum_name}}}` Enum
7
+ {{#enum_description}}
8
+ {{{.}}}
9
+ {{/enum_description}}
10
+
11
+ ## Values
12
+ {{#values}}
13
+ - `{{{value}}}`
14
+ {{#value_description}}
15
+ {{{.}}}
16
+ {{/value_description}}
17
+ {{/values}}
18
+
19
+ {{#command_references.length}}
20
+ ## References
21
+ The following commands reference this enum:
22
+ {{#command_references}}
23
+ - [{{{command_name}}}](../commands/{{{command_name}}}.md)
24
+ {{/command_references}}
25
+ {{/command_references.length}}
@@ -0,0 +1,15 @@
1
+ ### `{{{enum_name}}}`
2
+ {{#enum_description}}
3
+ {{{.}}}
4
+ {{/enum_description}}
5
+
6
+ #### Values
7
+ {{#values}}
8
+ - `{{{value}}}`
9
+ {{#value_description}}
10
+ {{{.}}}
11
+ {{/value_description}}
12
+ {{/values}}
13
+ {{^is_last}}
14
+
15
+ {{/is_last}}
@@ -0,0 +1,11 @@
1
+ ### {{^overload_header}}`/{{{command_name}}}{{#params}} {{> parameter}}{{/params}}`{{/overload_header}}{{#overload_header}}{{{.}}}{{/overload_header}}
2
+ {{#overload_header}}
3
+ `/{{{command_name}}}{{#params}} {{> parameter}}{{/params}}`
4
+
5
+ {{/overload_header}}
6
+ {{#overload_description}}
7
+ {{{.}}}
8
+ {{/overload_description}}
9
+ {{^is_last}}
10
+
11
+ {{/is_last}}
@@ -0,0 +1 @@
1
+ {{^type.is_keyword}}{{#is_optional}}[{{/is_optional}}{{^is_optional}}<{{/is_optional}}{{{param_name}}}: {{^type.syntax}}{{{type.name}}}{{/type.syntax}}{{#type.syntax}}{{{type.syntax}}}{{/type.syntax}}{{#is_optional}}]{{/is_optional}}{{^is_optional}}>{{/is_optional}}{{/type.is_keyword}}{{#type.is_keyword}}{{#is_optional}}[{{/is_optional}}{{{type.keyword_name}}}{{#is_optional}}: {{{type.name}}}]{{/is_optional}}{{/type.is_keyword}}
@@ -0,0 +1,21 @@
1
+ ---
2
+ {{ >default_metadata }}
3
+ title: Minecraft Commands
4
+ description: List and descriptions of Minecraft commands and enums
5
+ ---
6
+ # List and summary of commands:
7
+ |Command |Description |Required Permission Level | Requires Cheats Enabled |
8
+ |----------|-----------|-----------|-----------|
9
+ {{#commands}}
10
+ | [`/{{{name}}}`](./commands/{{{name}}}.md) | {{^command_description}}{{description}}{{/command_description}}{{#command_description}}{{.}}{{/command_description}} | {{permission_level_name}} | {{#requires_cheats}}Yes{{/requires_cheats}}{{^requires_cheats}}No{{/requires_cheats}} |
11
+ {{/commands}}
12
+
13
+ # List and summary of command argument types and enums:
14
+ |Type |Description |Is Enum? |
15
+ |----------|-----------|-----------|
16
+ {{#command_types}}
17
+ | {{{name}}} | {{type_description}} | |
18
+ {{/command_types}}
19
+ {{#command_enums}}
20
+ | [`{{{name}}}`](./enums/{{{name}}}.md) | {{enum_description}} | Yes |
21
+ {{/command_enums}}
@@ -0,0 +1,6 @@
1
+ - name: List of commands
2
+ href: commands.md
3
+ {{#commands}}
4
+ - name: {{{name}}}
5
+ href: commands/{{{name}}}.md
6
+ {{/commands}}
@@ -0,0 +1,162 @@
1
+ ---
2
+ {{ >default_metadata }}
3
+ title: {{{from_module.filepath_name}}}.{{{name}}} {{#is_interface}}Interface{{/is_interface}}{{^is_interface}}Class{{/is_interface}}
4
+ description: Contents of the {{{from_module.name}}}.{{{name}}} class{{#from_module.prior_version}} (Version {{.}}){{/from_module.prior_version}}.
5
+ {{#is_prerelease}}
6
+ monikerRange: "=minecraft-bedrock-experimental"
7
+ {{/is_prerelease}}
8
+ ---
9
+ # {{{class_name}}} {{#is_interface}}Interface{{/is_interface}}{{^is_interface}}Class{{/is_interface}}{{#from_module.prior_version}} (Version {{.}}){{/from_module.prior_version}}
10
+ {{#show_prior_warning}}
11
+
12
+ > [!IMPORTANT]
13
+ > This documentation is for an older version of this module.{{#prior_link}} Go to the latest documentation [*here*]({{{.}}}).{{/prior_link}}
14
+ {{/show_prior_warning}}
15
+ {{#is_prerelease}}
16
+
17
+ > [!CAUTION]
18
+ > This {{#is_interface}}interface{{/is_interface}}{{^is_interface}}class{{/is_interface}} is still in pre-release. Its signature may change or it may be removed in future releases.
19
+ {{/is_prerelease}}
20
+ {{#is_deprecated}}
21
+
22
+ > [!CAUTION]
23
+ > This {{#is_interface}}interface{{/is_interface}}{{^is_interface}}class{{/is_interface}} is deprecated and will be removed in {{{deprecated_version}}}.
24
+ {{#deprecated_description_md}}
25
+ >
26
+ > {{{.}}}
27
+ {{/deprecated_description_md}}
28
+ {{/is_deprecated}}
29
+ {{#has_runtime_conditions}}
30
+
31
+ ## Required Experiments
32
+ {{#runtime_conditions}}
33
+ - {{.}}
34
+ {{/runtime_conditions}}
35
+
36
+ {{/has_runtime_conditions}}
37
+ {{#base_types.length}}
38
+
39
+ ## Extends
40
+ {{#base_types}}
41
+ - {{> type_with_links}}
42
+ {{/base_types}}
43
+ {{/base_types.length}}
44
+ {{#iterator}}
45
+
46
+ ## Implements
47
+ - Iterator&lt;{{> type_with_links}}&gt;
48
+ {{/iterator}}
49
+ {{#derived_types.length}}
50
+
51
+ ## Classes that extend {{{class_name}}}
52
+ {{#derived_types}}
53
+ - {{> type_with_links}}
54
+ {{/derived_types}}
55
+ {{/derived_types.length}}
56
+ {{#class_description_md}}
57
+
58
+ {{{.}}}
59
+ {{/class_description_md}}
60
+ {{#properties.length}}
61
+
62
+ ## Properties
63
+ {{#properties}}
64
+
65
+ {{> property}}
66
+ {{/properties}}
67
+ {{/properties.length}}
68
+ {{#has_member_functions}}
69
+
70
+ ## Methods
71
+ {{! Constructor(s), methods, then static functions}}
72
+ {{#functions}}
73
+ {{#is_constructor}}
74
+ {{#stable_only}}
75
+ ::: moniker range="=minecraft-bedrock-stable"
76
+ {{/stable_only}}
77
+ {{#is_prerelease}}
78
+ ::: moniker range="=minecraft-bedrock-experimental"
79
+ {{/is_prerelease}}
80
+ - [{{{name}}}](#{{bookmark_name}})
81
+ {{#is_prerelease}}
82
+ ::: moniker-end
83
+ {{/is_prerelease}}
84
+ {{#stable_only}}
85
+ ::: moniker-end
86
+ {{/stable_only}}
87
+ {{/is_constructor}}
88
+ {{/functions}}
89
+ {{#functions}}
90
+ {{^is_constructor}}
91
+ {{^is_static}}
92
+ {{#stable_only}}
93
+ ::: moniker range="=minecraft-bedrock-stable"
94
+ {{/stable_only}}
95
+ {{#is_prerelease}}
96
+ ::: moniker range="=minecraft-bedrock-experimental"
97
+ {{/is_prerelease}}
98
+ - [{{{name}}}](#{{bookmark_name}})
99
+ {{#is_prerelease}}
100
+ ::: moniker-end
101
+ {{/is_prerelease}}
102
+ {{#stable_only}}
103
+ ::: moniker-end
104
+ {{/stable_only}}
105
+ {{/is_static}}
106
+ {{/is_constructor}}
107
+ {{/functions}}
108
+ {{#functions}}
109
+ {{^is_constructor}}
110
+ {{#is_static}}
111
+ {{#stable_only}}
112
+ ::: moniker range="=minecraft-bedrock-stable"
113
+ {{/stable_only}}
114
+ {{#is_prerelease}}
115
+ ::: moniker range="=minecraft-bedrock-experimental"
116
+ {{/is_prerelease}}
117
+ - [{{{name}}}](#{{bookmark_name}})
118
+ {{#is_prerelease}}
119
+ ::: moniker-end
120
+ {{/is_prerelease}}
121
+ {{#stable_only}}
122
+ ::: moniker-end
123
+ {{/stable_only}}
124
+ {{/is_static}}
125
+ {{/is_constructor}}
126
+ {{/functions}}
127
+ {{! Constructor(s), methods, then static functions}}
128
+ {{#functions}}
129
+ {{#is_constructor}}
130
+
131
+ {{> function}}
132
+ {{/is_constructor}}
133
+ {{/functions}}
134
+ {{#functions}}
135
+ {{^is_constructor}}
136
+ {{^is_static}}
137
+
138
+ {{> function}}
139
+ {{/is_static}}
140
+ {{/is_constructor}}
141
+ {{/functions}}
142
+ {{#functions}}
143
+ {{^is_constructor}}
144
+ {{#is_static}}
145
+
146
+ {{> function}}
147
+ {{/is_static}}
148
+ {{/is_constructor}}
149
+ {{/functions}}
150
+ {{/has_member_functions}}
151
+ {{#has_member_constants}}
152
+
153
+ ## Constants
154
+ {{#constants}}
155
+
156
+ {{> property}}
157
+ {{/constants}}
158
+ {{/has_member_constants}}
159
+ {{#examples.length}}
160
+
161
+ {{> examples}}
162
+ {{/examples.length}}
@@ -0,0 +1,5 @@
1
+ # DO NOT TOUCH — This file was automatically generated by @minecraft/api-docs-generator, to report problems file an issue at https://github.com/Mojang/minecraft-scripting-libraries
2
+ author: jakeshirley
3
+ ms.author: jashir
4
+ ms.service: minecraft-bedrock-edition
5
+ ms.date: 02/10/2025
@@ -0,0 +1,39 @@
1
+ ---
2
+ {{ >default_metadata }}
3
+ title: {{{from_module.filepath_name}}}.{{{enum_name}}} Enumeration
4
+ description: Contents of the {{{from_module.name}}}.{{{name}}} enumeration{{#from_module.prior_version}} (Version {{.}}){{/from_module.prior_version}}.
5
+ {{#is_prerelease}}
6
+ monikerRange: "=minecraft-bedrock-experimental"
7
+ {{/is_prerelease}}
8
+ ---
9
+ # {{{enum_name}}} Enumeration{{#from_module.prior_version}} (Version {{.}}){{/from_module.prior_version}}
10
+ {{#show_prior_warning}}
11
+
12
+ > [!IMPORTANT]
13
+ > This documentation is for an older version of this module.{{#prior_link}} Go to the latest documentation [*here*]({{{.}}}).{{/prior_link}}
14
+ {{/show_prior_warning}}
15
+ {{#is_prerelease}}
16
+
17
+ > [!CAUTION]
18
+ > This enum is still in pre-release. Its signature may change or it may be removed in future releases.
19
+ {{/is_prerelease}}
20
+ {{#is_deprecated}}
21
+
22
+ > [!CAUTION]
23
+ > This enum is deprecated and will be removed in {{{deprecated_version}}}.
24
+ {{#deprecated_description_md}}
25
+ >
26
+ > {{{.}}}
27
+ {{/deprecated_description_md}}
28
+ {{/is_deprecated}}
29
+ {{#enum_description_md}}
30
+
31
+ {{{.}}}
32
+ {{/enum_description_md}}
33
+ {{#constants.length}}
34
+
35
+ ## Constants
36
+ {{#constants}}
37
+ {{> property_declaration }}
38
+ {{/constants}}
39
+ {{/constants.length}}
@@ -0,0 +1,15 @@
1
+ #### Examples
2
+ {{#examples}}
3
+
4
+ ##### ***{{{name}}}***
5
+
6
+ ```typescript
7
+ {{#code}}
8
+ {{#text}}
9
+ {{{ . }}}
10
+ {{/text}}
11
+ {{/code}}
12
+ ```
13
+
14
+ (preview) Work with this sample on the [MCTools.dev](https://mctools.dev/?open=gp/{{{name}}}) code sandbox.
15
+ {{/examples}}