diff options
author | metamuffin <metamuffin@disroot.org> | 2023-07-26 16:27:16 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-07-26 16:27:16 +0200 |
commit | f35043b395adf9ffa06b71000dfba6f560d44cb7 (patch) | |
tree | f95ecf9785b86da750064510038b5159f36ce2c5 /makefile | |
parent | 0ae2d031aa2bf13f9e0ba90b945e79cd614cfd7e (diff) | |
download | fastbangs-f35043b395adf9ffa06b71000dfba6f560d44cb7.tar fastbangs-f35043b395adf9ffa06b71000dfba6f560d44cb7.tar.bz2 fastbangs-f35043b395adf9ffa06b71000dfba6f560d44cb7.tar.zst |
add a bunch of ui for the search page and style
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 34 |
1 files changed, 18 insertions, 16 deletions
@@ -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 |