blob: 9ab4c64629279f4a4fffff61903802aebf99c9ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
ESFLAGS = --target=esnext --format=esm
deploy-dir: deploy deploy/bundle.js deploy/index.html deploy/bangs-ddgless
deploy.zip: deploy-dir
zip deploy.zip -r deploy
deploy:
mkdir -p deploy
watch:
esbuild frontend/main.ts --bundle --outfile=deploy/bundle.js $(ESFLAGS) --watch
deploy/bundle.js: $(shell find frontend -name '*.ts')
esbuild frontend/main.ts --bundle --outfile=deploy/bundle.js $(ESFLAGS)
deploy/index.html: frontend/index.html
cp $< $@
deploy/bangs-ddgless: $(shell find src -name '*.hs')
stack install --local-bin-path deploy
clean:
stack clean --full
rm deploy/{bundle.js,index.html,bangs-ddgless}
rm deploy.zip
rmdir deploy # this may fail if the server was run, due to the bangs.json being generated
.PHONY: watch clean
|