Skip to content

Commit a8f85a4

Browse files
authored
compiling and running (#11)
1 parent 8cbae96 commit a8f85a4

11 files changed

+338
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ abap2xlsx
44
abap2xlsx-demos
55
open-abap-core
66
src/abap.ts
7+
src/abap.js
78
input
89
output

abap.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ function escape(input) {
1010
if (input.charCodeAt(0) === 0xFEFF) {
1111
input = input.substr(1);
1212
}
13-
return input.replaceAll("`", "\\`").replaceAll("${", "\\${").trimEnd();
13+
return input.replaceAll("\\", "\\\\")
14+
.replaceAll("`", "\\`")
15+
.replaceAll("${", "\\${").trimEnd();
1416
}
1517

1618
function add(name, contents) {
@@ -60,7 +62,7 @@ for (const dirent of fs.readdirSync("abap2xlsx/src", {recursive: true, withFileT
6062

6163
/////////////////////////////////////////
6264

63-
fs.writeFileSync("src/abap.ts", output + "\n};");
65+
fs.writeFileSync("src/abap.js", output + "\n};");
6466
for (const filename in files) {
6567
fs.writeFileSync(path.join("input", filename), files[filename]);
6668
}

abap_transpile.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"ignoreSyntaxCheck": false,
1010
"addFilenames": true,
1111
"addCommonJS": true,
12+
"skipReposrc": true,
1213
"unknownTypes": "runtimeError",
1314
"skip": []
1415
}

0 commit comments

Comments
 (0)