@biuxiu/codegen 0.2.11 → 0.2.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -2,9 +2,9 @@ import { compileToByte } from "./compile";
|
|
2
2
|
import { existsSync } from "fs";
|
3
3
|
import { genLuaTypes } from "./gen-type";
|
4
4
|
import { setConfig, setReverse } from "./config";
|
5
|
-
async function startRun(filePath,
|
5
|
+
async function startRun(filePath, isDelete, config) {
|
6
6
|
if (config) setConfig(config);
|
7
|
-
setReverse(
|
7
|
+
setReverse(isDelete);
|
8
8
|
if (existsSync(filePath)) {
|
9
9
|
try {
|
10
10
|
const data = await compileToByte(filePath);
|
@@ -18,10 +18,10 @@ async function startRun(filePath, isReverse, config) {
|
|
18
18
|
}
|
19
19
|
}
|
20
20
|
const startGen = (filePath, config) => {
|
21
|
-
return startRun(filePath,
|
21
|
+
return startRun(filePath, false, config);
|
22
22
|
};
|
23
23
|
const startRemove = (filePath, config) => {
|
24
|
-
return startRun(filePath,
|
24
|
+
return startRun(filePath, true, config);
|
25
25
|
};
|
26
26
|
export {
|
27
27
|
genLuaTypes,
|