blob: 7a9e36b51318de62b22eb64eb69c944290966468 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
ESFLAGS = --bundle --target=esnext --format=esm
.PHONY: all watch
all: public/assets/bundle.js public/assets/sw.js public/assets/font/include.css public/assets/bundle.css
watch: public/assets/font/include.css # TODO watch css
esbuild $(ESFLAGS) source/index.ts --outfile=public/assets/bundle.js --watch=forever &
esbuild $(ESFLAGS) source/sw/worker.ts --outfile=public/assets/sw.js --watch=forever
public/assets/bundle.js: $(shell find source -type f -name '*.ts')
esbuild $(ESFLAGS) source/index.ts --outfile=$@
public/assets/sw.js: $(shell find source/sw -type f -name '*.ts')
esbuild $(ESFLAGS) source/sw/worker.ts --outfile=$@
public/assets/bundle.css: $(shell find style -type f -name '*.css')
cat style/imports $^ >$@
public/assets/font/include.css:
mkdir -p public/assets/font
curl 'https://s.metamuffin.org/static/font-ubuntu.tar' | tar -xC public/assets/font
|