aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoris2022-07-05 21:55:41 +0200
committerJoris2023-01-28 09:35:55 +0100
commit063d8ef9eaf874a941f4459e831057dd0a1b7ddd (patch)
treec4a8b27cb8fdb5d1dc26c560c7483c9593f40dac /Makefile
parent2936f06576997bffe7903ea840df563a408efc21 (diff)
Rewrite in TSmain
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 6 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index c40999d..593752d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,9 @@
-export PATH := node_modules/.bin:$(PATH)
-
-build: public/main.js
-
-public/main.js: install $(shell find src \( -type d -o \( -type f -a -regex ".*\.ml" \) \))
- @echo "Building $@"
- @bsb -make-world
- @rollup --config rollup.config.js
- @terser $@ --output $@ --compress --mangle
-
-install:
- @npm install
- @bsb -init init
- @mv init/node_modules/bs-platform node_modules
- @rm -rf init
+build:
+ @esbuild \
+ --bundle src/main.ts \
+ --minify \
+ --target=es2017 \
+ --outdir=public
clean:
- @echo "Cleaning"
@rm -f public/main.js
- @rm -rf node_modules lib
- @find src -name '*.bs.js' -exec rm {} \;