@biuxiu/codegen 0.2.6 → 0.2.7
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/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { compileToByte } from "./compile";
|
2
2
|
import { existsSync } from "fs";
|
3
|
-
import { run } from "./lua_codegen";
|
4
3
|
import { genLuaTypes } from "./gen-type";
|
5
4
|
import { setConfig } from "./config";
|
6
5
|
async function startRun(filePath, config) {
|
@@ -8,7 +7,8 @@ async function startRun(filePath, config) {
|
|
8
7
|
if (existsSync(filePath)) {
|
9
8
|
try {
|
10
9
|
const data = await compileToByte(filePath);
|
11
|
-
run
|
10
|
+
const { run } = await import("./lua_codegen");
|
11
|
+
run(new Uint8Array(data), filePath);
|
12
12
|
} catch (error) {
|
13
13
|
return Promise.reject(error);
|
14
14
|
}
|