elo-worldle/Makefile

28 lines
642 B
Makefile
Raw Permalink Normal View History

2023-03-26 23:33:41 -04:00
.PHONY: build serve clean scp
2023-04-01 23:11:32 -04:00
build: chess.min.js main.min.js gchessboard.min.js Makefile
2023-03-26 23:33:41 -04:00
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/
2023-04-01 23:11:32 -04:00
# https://unix.stackexchange.com/questions/153862/remove-all-files-directories-except-for-one-file
2023-03-26 23:33:41 -04:00
clean:
2023-04-01 23:11:32 -04:00
find . -name "*.js" ! -name "gchessboard*" -exec rm {} +
2023-03-26 23:33:41 -04:00
# main.js: main.ts
# tsc main.ts
2023-04-01 23:11:32 -04:00
%.min.js: %.js
npx uglify-js $< | sed s/chess\.js/chess.min.js/g > $@
2023-03-26 23:33:41 -04:00
%.js: %.ts tsconfig.json
tsc
2023-04-01 23:11:32 -04:00