Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
larshp committed Sep 9, 2024
1 parent eb06d0f commit 46dbfa5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion abap.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ for (const dirent of fs.readdirSync("abap2xlsx/src", {recursive: true, withFileT

/////////////////////////////////////////

fs.writeFileSync("src/abap.ts", output + "\n};");
fs.writeFileSync("src/abap.js", output + "\n};");
for (const filename in files) {
fs.writeFileSync(path.join("input", filename), files[filename]);
}
1 change: 1 addition & 0 deletions abap_transpile.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ignoreSyntaxCheck": false,
"addFilenames": true,
"addCommonJS": true,
"skipReposrc": true,
"unknownTypes": "runtimeError",
"skip": []
}
Expand Down
Binary file modified public/zcl_excel_demo1.xlsx
Binary file not shown.
Binary file modified public/zcl_excel_demo2.xlsx
Binary file not shown.
10 changes: 7 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import * as abaplint from "@abaplint/core";
import * as abapMonaco from "@abaplint/monaco";
import Split from "split-grid";
import { abapfiles } from "./abap.js";
import {initializeABAP} from "../output/init.mjs";
//initializeABAP();
import * as initabap from "../output/init.mjs";
console.dir(initabap); // just to make sure its not shaked away

const reg = new abaplint.Registry(new abaplint.Config(JSON.stringify(config)));
for (const filename in abapfiles) {
Expand Down Expand Up @@ -109,6 +109,9 @@ document.getElementById("demoDropdown").addEventListener("change", (e) => {
const AsyncFunction = new Function(`return Object.getPrototypeOf(async function(){}).constructor`)();

async function abapChanged() {
// @ts-ignore
console.dir(globalThis.abap);

try {
const contents = editor1.getValue();
const file = new abaplint.MemoryFile(filename, contents);
Expand Down Expand Up @@ -144,4 +147,5 @@ async function abapChanged() {
editor1.onDidChangeModelContent(abapChanged);
abapChanged();
editor1.focus();
const abap = new ABAP({console: new MemoryConsole()});

//const abap = new ABAP({console: new MemoryConsole()});
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ module.exports = {
"ts.worker": "monaco-editor/esm/vs/language/typescript/ts.worker",
*/
},
experiments: {
topLevelAwait: true
},
devServer: {
open: true,
hot: true,
Expand Down

0 comments on commit 46dbfa5

Please sign in to comment.