blob: c40999d8827d78fb089ff3d58062aa611dea4133 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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
clean:
@echo "Cleaning"
@rm -f public/main.js
@rm -rf node_modules lib
@find src -name '*.bs.js' -exec rm {} \;
|