From f920c7da0618fd9f4181c2c78ef054e324185355 Mon Sep 17 00:00:00 2001 From: ngharo Date: Sun, 31 Dec 2017 22:16:32 -0600 Subject: Makefile: compile Babel and Sass source files to index.* --- www/Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 www/Makefile (limited to 'www/Makefile') 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 -- cgit v1.2.3