Skip to content

Commit

Permalink
restructure the project
Browse files Browse the repository at this point in the history
  • Loading branch information
iliyan-velichkov committed Jun 20, 2024
1 parent eceb627 commit 60393f4
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
node_modules
output
dist
.env
.DS_Store
.idea
.idea
6 changes: 3 additions & 3 deletions abap_transpile.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"input_folder": "src",
"input_folder": "src/abap",
"input_filter": [],
"output_folder": "output",
"output_folder": "dist/abap",
"libs": [
{
"url": "https://github.com/open-abap/open-abap-core"
Expand All @@ -16,4 +16,4 @@
"unknownTypes": "runtimeError",
"skip": []
}
}
}
8 changes: 5 additions & 3 deletions build-mac.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
rm -rf output
rm -rf dist
rm -rf node_modules

mkdir dist

npm install

# check package.json for more details
npm run transpile

npm run lint
Expand All @@ -12,7 +14,7 @@ npm run lint
# and replaces all occurrences of %23 with # in those files.
find . -name '*.mjs' -print0 | xargs -0 sed -i '' 's/%23/#/g'

esbuild run.mjs --tsconfig=./tsconfig.json --bundle --outdir=dist --format=esm --target=es2022 \
esbuild src/run.mjs --tsconfig=./tsconfig.json --bundle --outdir=dist --format=esm --target=es2022 \
--external:tls --external:net --external:util --external:crypto --external:zlib \
--external:http --external:https --external:fs --external:path --external:url --external:sdk \
--inject:./polyfills/buffer.js --inject:./polyfills/process.js --out-extension:.js=.mjs
--inject:./src/lib/polyfills/buffer.js --inject:./src/lib/polyfills/process.js --out-extension:.js=.mjs
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions run.mjs → src/run.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { initializeABAP } from './output/init.mjs';
import { zcl_hello_world } from './output/zcl_hello_world.clas.mjs';
import { initializeABAP } from './dist/abap/init.mjs';
import { zcl_hello_world } from './dist/abap/zcl_hello_world.clas.mjs';
import { DatabaseInitializer } from "sdk/abap/database";

DatabaseInitializer.initDefaultDataSource();
Expand Down

0 comments on commit 60393f4

Please sign in to comment.