mbler 0.2.4 → 0.2.7-rc.1
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.
- package/README.md +48 -41
- package/bin/mbler.js +3 -3
- package/bin/mcx-tsc.js +1 -1
- package/client.d.ts +17 -0
- package/dist/build.d.ts +16 -5
- package/dist/build.esm.mjs +755 -425
- package/dist/build.esm.mjs.map +1 -1
- package/dist/build.js +754 -425
- package/dist/build.js.map +1 -1
- package/dist/index.d.ts +20 -63
- package/dist/index.esm.mjs +669 -850
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.js +659 -838
- package/dist/index.js.map +1 -1
- package/dist/template/mcx/behavior/scripts/app.mcx +8 -5
- package/dist/template/mcx/behavior/scripts/component/ComponentTest.mcx +19 -0
- package/dist/template/mcx/behavior/scripts/config/config.json +5 -0
- package/dist/template/mcx/behavior/scripts/{event$1.mcx → event/event$1.mcx} +2 -3
- package/dist/template/mcx/behavior/scripts/event/event.mcx +10 -0
- package/dist/template/mcx/behavior/scripts/event/test.ts +3 -0
- package/dist/template/mcx/behavior/scripts/index.ts +5 -0
- package/dist/template/ts/behavior/scripts/index.ts +1 -1
- package/package.json +31 -20
- package/dist/template/mcx/behavior/pack_icon.png +0 -0
- package/dist/template/mcx/behavior/scripts/event.mcx +0 -9
- package/dist/template/mcx/behavior/scripts/index.mjs +0 -5
package/README.md
CHANGED
|
@@ -1,41 +1,48 @@
|
|
|
1
|
-
# MBLER
|
|
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
|
-
|
|
1
|
+
# MBLER
|
|
2
|
+
|
|
3
|
+
### Introduction
|
|
4
|
+
|
|
5
|
+
A development tool for Minecraft Addon based on Rolldown, featuring:
|
|
6
|
+
|
|
7
|
+
- MCX DSL
|
|
8
|
+
- Manifest Generator
|
|
9
|
+
- Bundle
|
|
10
|
+
- Component build
|
|
11
|
+
|
|
12
|
+
## About repo
|
|
13
|
+
|
|
14
|
+
[MCX CORE](https://github.com/RuanhoR/mcx-core) | [MCX Language Server](https://github.com/RuanhoR/mcx-language-server) | [MCX Template](https://github.com/RuanhoR/mcx-template) | [MNX Market](https://github.com/RuanhoR/mnx)
|
|
15
|
+
|
|
16
|
+
### Installation
|
|
17
|
+
|
|
18
|
+
Ensure you have the following tools installed:
|
|
19
|
+
|
|
20
|
+
- Node.js and npm
|
|
21
|
+
- Git
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g mbler
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
After installation, you can use it directly:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Get version
|
|
31
|
+
mbler -v
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Initialize directory configuration file:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
mbler init
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For details, see: [Documentation](https://mbler-docs.ruanhor.dpdns.org/)
|
|
41
|
+
|
|
42
|
+
### Release Platforms
|
|
43
|
+
|
|
44
|
+
[github](https://github.com/RuanhoR/mbler) | [gitee](https://gitee.com/n304sc-haoran/mbler.git) | [npm](https://npmjs.com/package/mbler)
|
|
45
|
+
|
|
46
|
+
## Documentation
|
|
47
|
+
|
|
48
|
+
[中文](https://zh-mbler-docs.ruanhor.dpdns.org/) | [English](https://mbler-docs.ruanhor.dpdns.org/) | [한국어](./README_ko.md) | [日本語](./README_ja.md)
|
package/bin/mbler.js
CHANGED
package/bin/mcx-tsc.js
CHANGED
package/client.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as mcx from '@mbler/mcx-core'
|
|
2
|
+
|
|
3
|
+
declare module '*.png' {
|
|
4
|
+
export default mcx.PNGImageComponent
|
|
5
|
+
}
|
|
6
|
+
declare module '*.svg' {
|
|
7
|
+
export default mcx.SVGImageComponent
|
|
8
|
+
}
|
|
9
|
+
declare module '*.jpg' {
|
|
10
|
+
export default mcx.JPGImageComponent
|
|
11
|
+
}
|
|
12
|
+
declare module '*.jpeg' {
|
|
13
|
+
export default mcx.JPGImageComponent
|
|
14
|
+
}
|
|
15
|
+
declare module '*.gif' {
|
|
16
|
+
export default mcx.GIFImageComponent
|
|
17
|
+
}
|
package/dist/build.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as typescript from 'typescript';
|
|
2
2
|
import { watch as watch$1 } from 'chokidar';
|
|
3
|
-
import
|
|
4
|
-
import { Plugin } from 'rollup';
|
|
3
|
+
import { Plugin, RolldownWatcher } from 'rolldown';
|
|
5
4
|
import { LanguagePlugin } from '@volar/language-core';
|
|
6
5
|
|
|
7
6
|
interface MblerConfigScript {
|
|
@@ -17,7 +16,9 @@ interface MblerConfigOutdir {
|
|
|
17
16
|
}
|
|
18
17
|
interface MblerBuildConfig {
|
|
19
18
|
rollupPlugins: Plugin[];
|
|
20
|
-
|
|
19
|
+
rollupExternal: string[];
|
|
20
|
+
cache: 'none' | 'memory' | 'file' | 'filesystem' | 'auto';
|
|
21
|
+
cachePath: string;
|
|
21
22
|
bundle: boolean;
|
|
22
23
|
onEnd: (ctx: MblerConfigData) => void | Promise<void>;
|
|
23
24
|
onStart: (ctx: MblerConfigData) => void | Promise<void>;
|
|
@@ -38,6 +39,16 @@ interface CliParam {
|
|
|
38
39
|
opts: Record<string, string>;
|
|
39
40
|
}
|
|
40
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Compare two dotted version strings ("major.minor.patch").
|
|
44
|
+
* Returns negative if a < b, positive if a > b, zero if equal.
|
|
45
|
+
*/
|
|
46
|
+
declare const Sapi: () => {
|
|
47
|
+
refresh: () => Promise<void>;
|
|
48
|
+
generateVersion: (module: "@minecraft/server-ui" | "@minecraft/server", mcVersion: string, isBeta: boolean, withFull: boolean) => Promise<string>;
|
|
49
|
+
};
|
|
50
|
+
declare const _default: ReturnType<typeof Sapi>;
|
|
51
|
+
|
|
41
52
|
/**
|
|
42
53
|
* 运行 MCX TypeScript 编译器
|
|
43
54
|
* 为 .mcx 文件提供 TypeScript 类型检查支持
|
|
@@ -78,7 +89,7 @@ declare class Build {
|
|
|
78
89
|
* Can be safely called even before `watch()` has been invoked.
|
|
79
90
|
*/
|
|
80
91
|
getWatchers(): {
|
|
81
|
-
rollup:
|
|
92
|
+
rollup: RolldownWatcher;
|
|
82
93
|
chokidar: ReturnType<typeof watch$1>;
|
|
83
94
|
} | null;
|
|
84
95
|
/**
|
|
@@ -154,4 +165,4 @@ declare class Build {
|
|
|
154
165
|
declare function build(cliParam: CliParam, work: string): Promise<number>;
|
|
155
166
|
declare function watch(cliParam: CliParam, work: string): Promise<number>;
|
|
156
167
|
|
|
157
|
-
export { Build, runTSC as McxTsc, build, watch };
|
|
168
|
+
export { Build, runTSC as McxTsc, _default as Sapi, build, watch };
|