Skip to content

Commit dce96db

Browse files
committed
更新名称
1 parent be30072 commit dce96db

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

wrapper-js/src/index.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ const TAB = " "
55

66
const DIR_EXTEND_LIBRARIES = "./wrapper-js/extend/libraries/"
77
const DIR_CPP = "./native/cpp/"
8-
const FILE_CPP = DIR_CPP + "quickjs_extend_libraries.h"
8+
const FILE_H = DIR_CPP + "quickjs_extend_libraries.h"
99

10-
if (existDir(FILE_CPP)) {
11-
removeFile(FILE_CPP)
10+
if (existDir(FILE_H)) {
11+
removeFile(FILE_H)
1212
}
1313

1414
(function init() {
@@ -52,7 +52,7 @@ if (existDir(FILE_CPP)) {
5252
code += TAB
5353
code += `JS_Eval(ctx, ${datePVarName}, strlen(${datePVarName}), "date-polyfill.js", JS_EVAL_TYPE_GLOBAL);`
5454
code += LINE
55-
55+
5656
code += TAB
5757
code += `JS_FreeValue(ctx, JS_Eval(ctx, ${consoleVarName}, strlen(${consoleVarName}), "console.js", JS_EVAL_TYPE_GLOBAL));`
5858
code += LINE
@@ -63,5 +63,5 @@ if (existDir(FILE_CPP)) {
6363
code += LINE.repeat(2)
6464
code += "#endif //QUICKJS_EXTEND_LIBRARIES"
6565

66-
writeToFile(FILE_CPP, code)
66+
writeToFile(FILE_H, code)
6767
})()

0 commit comments

Comments
 (0)