32 lines
679 B
Makefile
32 lines
679 B
Makefile
default:
|
|
@just --list
|
|
|
|
build: && manifest
|
|
tl build
|
|
@mkdir -p out/vendor
|
|
find src/vendor -name "*.lua" -exec cp -t out/vendor {} +
|
|
|
|
alias b := build
|
|
|
|
manifest_file := "out/manifest.txt"
|
|
manifest:
|
|
rm -f {{ manifest_file }}
|
|
find out -name "*.lua" -exec realpath --relative-to=out {} >> {{ manifest_file }} \;
|
|
|
|
min-build: build
|
|
find out -name "*.lua" -exec lua minify.lua {} \;
|
|
|
|
clean:
|
|
rm -r out
|
|
|
|
alias c := clean
|
|
|
|
watch_recipe := env_var_or_default("WATCH_RECIPE", "build")
|
|
|
|
watch:
|
|
while sleep 0.1; do \
|
|
find . -type f ! -path './out/*' | entr -d just {{ watch_recipe }}; \
|
|
[ $? -eq 0 ] && exit 0; \
|
|
done
|
|
|
|
alias w := watch |