elo-worldle/Makefile
2023-04-01 23:11:32 -04:00

28 lines
642 B
Makefile

.PHONY: build serve clean scp
build: chess.min.js main.min.js gchessboard.min.js Makefile
serve: build
python -m http.server
upload: build
scp *.js *.html root@pyrope.net:/var/www/mysite/elo-worldle/
# i'm so generous for putting random crap for you to see :]
full-upload: build
scp * root@pyrope.net:/var/www/mysite/elo-worldle/
# https://unix.stackexchange.com/questions/153862/remove-all-files-directories-except-for-one-file
clean:
find . -name "*.js" ! -name "gchessboard*" -exec rm {} +
# main.js: main.ts
# tsc main.ts
%.min.js: %.js
npx uglify-js $< | sed s/chess\.js/chess.min.js/g > $@
%.js: %.ts tsconfig.json
tsc