From f35043b395adf9ffa06b71000dfba6f560d44cb7 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 26 Jul 2023 16:27:16 +0200 Subject: add a bunch of ui for the search page and style --- makefile | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 9ab4c64..fbd8871 100644 --- a/makefile +++ b/makefile @@ -1,28 +1,30 @@ ESFLAGS = --target=esnext --format=esm +.PHONY: watch clean deploy-dir +watch-script: + esbuild frontend/main.ts --bundle --outfile=deploy/bundle.js $(ESFLAGS) --watch +watch-style: + while true; do inotifywait -e modify -e move frontend/style.sass; make deploy/style.css; done + +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 + + 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 +deploy/bundle.js: $(shell find frontend -name '*.ts') + esbuild frontend/main.ts --bundle --outfile=deploy/bundle.js $(ESFLAGS) +deploy/style.css: frontend/style.sass + sassc $< $@ -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 -- cgit v1.2.3-70-g09d2