summaryrefslogtreecommitdiff
path: root/assets/Makefile
diff options
context:
space:
mode:
authorhref <href@random.sh>2021-09-03 04:02:43 +0200
committerhref <href@random.sh>2021-09-03 04:02:43 +0200
commit5fc45a0e3b144b5e87845d068940afb90c3646a6 (patch)
tree364e9276a63bd23d8033cdae4a9e3e4d5fd755c1 /assets/Makefile
parentimprove puppets, fix uploads (diff)
assets..
Diffstat (limited to 'assets/Makefile')
-rw-r--r--assets/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/assets/Makefile b/assets/Makefile
index 02a4048..5a376d9 100644
--- a/assets/Makefile
+++ b/assets/Makefile
@@ -13,6 +13,7 @@ FILES = ../priv/static/assets/site.css ../priv/static/assets/site.js ../priv/sta
FILES_GZ := $(addsuffix .gz, $(FILES))
FILES_BR := $(addsuffix .br, $(FILES))
FILES_CONTROLLERS := $(shell find controllers/ -name '*.js')
+FILES_CSS := $(shell find css/ -name '*.css')
.PHONY: all
all: node_modules $(FILES) $(FILES_GZ) $(FILES_BR)
@@ -21,7 +22,7 @@ node_modules: package.json package-lock.json
$(NPM) install
@$(TOUCH) node_modules
-../priv/static/assets/%.css: %.css
+../priv/static/assets/%.css: %.css $(FILES_CSS) tailwind.config.js postcss.config.js
NODE_ENV=production $(NPX) tailwindcss --postcss --minify -i $< -o $@
../priv/static/assets/%.js: %.js $(FILES_CONTROLLERS) script/build.%.js
@@ -54,9 +55,9 @@ watch: #watch_css watch_js
.PHONY: watch_css
watch_css:
- NODE_ENV=development $(NPX) tailwindcss --input=site.css --output=assets/site.css --postcss --watch
+ NODE_ENV=development $(NPX) tailwindcss --input=site.css --output=../priv/static/assets/site.css --postcss --watch
.PHONY: watch_js
watch_js:
- #NODE_ENV=development $(ESBUILD) site.js --bundle --sourcemap=inline --watch --outfile=assets/site.js
+ #NODE_ENV=development $(ESBUILD) site.js --bundle --sourcemap=inline --watch --outfile=../priv/static/assets/site.js
NODE_ENV=development $(NODE) script/watch.site.js