@biuxiu/codegen 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- 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
|
}
|