mirror of
https://github.com/thepigeongenerator/www.thepigeongenerator.xyz.git
synced 2025-12-16 06:45:44 +01:00
25 lines
455 B
Makefile
25 lines
455 B
Makefile
ESBUILD ?= npx esbuild
|
|
ESFLAGS += --bundle --minify
|
|
|
|
# debug handling
|
|
DEBUG ?= 0
|
|
ifneq ($(DEBUG),0)
|
|
ESFLAGS += --define:NDEBUG=0
|
|
else
|
|
ESFLAGS += --define:NDEBUG=1
|
|
endif
|
|
|
|
.PHONY: all clean
|
|
all: out/script.js out/index.html
|
|
clean:; rm -rf out/
|
|
|
|
# generating of HTML
|
|
out/index.html: web/index.html
|
|
@mkdir -p $(@D)
|
|
cp -f $< $@
|
|
|
|
# compiles / links source code
|
|
out/script.js: web/src/*.ts
|
|
@mkdir -p $(@D)
|
|
npx esbuild web/src/main.ts $(ESFLAGS) --outfile=$@
|