summaryrefslogtreecommitdiff
path: root/www/Makefile
diff options
context:
space:
mode:
authorngharo <nick@ngha.ro>2017-12-31 22:16:32 -0600
committerngharo <nick@ngha.ro>2017-12-31 22:16:32 -0600
commitf920c7da0618fd9f4181c2c78ef054e324185355 (patch)
treeeba4a9f21fb8fd47e8a53f01e8a4dfae25a333e2 /www/Makefile
parent75d05326d067857d22474cc91d069003d7b64b17 (diff)
downloadimOk-www-f920c7da0618fd9f4181c2c78ef054e324185355.tar.xz
imOk-www-f920c7da0618fd9f4181c2c78ef054e324185355.zip
Makefile: compile Babel and Sass source files to index.*
Diffstat (limited to 'www/Makefile')
-rw-r--r--www/Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
new file mode 100644
index 0000000..a9f86e7
--- /dev/null
+++ b/www/Makefile
@@ -0,0 +1,28 @@
+DEPLOY_TARGET="/var/www/imok.ngha.ro/"
+
+PATH := node_modules/.bin:$(PATH)
+SHELL := /bin/bash
+
+css_out := index.css
+js_out := index.js
+libs := lib/app.js
+styles := styles/app.scss
+
+.PHONY: all clean deploy
+
+all: $(app_bundle)
+
+%.js:
+ babel $< --out-file $@
+
+%.css:
+ sass --style compressed $< $@
+
+index.css: $(styles)
+index.js: $(libs)
+build: index.css index.js
+
+deploy: index.*
+ rsync -vr $^ $(DEPLOY_TARGET)
+
+all: build deploy