2023-11-08 04:39:56 -05:00
|
|
|
PWD := $(shell pwd)
|
2023-12-16 20:42:34 +00:00
|
|
|
NPX ?= npx
|
2023-11-08 04:39:56 -05:00
|
|
|
|
|
|
|
all: bundle.js main.css
|
2024-05-08 14:07:20 +01:00
|
|
|
make -C ../../../tutorials/http/http-server ARGS="-d $(PWD)"
|
2023-11-08 04:39:56 -05:00
|
|
|
|
|
|
|
# Bundle JS libraries (preact, preact-router, ...) into a single file
|
|
|
|
bundle.js:
|
|
|
|
curl -s https://npm.reversehttp.com/preact,preact/hooks,htm/preact,preact-router -o $@
|
|
|
|
|
|
|
|
# Create optimised CSS. Prerequisite: npm -g i tailwindcss tailwindcss-font-inter
|
|
|
|
main.css: index.html $(wildcard *.js)
|
2023-12-16 20:42:34 +00:00
|
|
|
$(NPX) tailwindcss -o $@ --minify
|
2023-11-08 04:39:56 -05:00
|
|
|
|
|
|
|
clean:
|
|
|
|
true
|