aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorrtz12 <koenig@fagott.pw>2016-01-17 21:31:12 (UTC)
committerrtz12 <koenig@fagott.pw>2016-01-17 21:31:12 (UTC)
commit72ad0e53f3887b5ad74034a99c6453a88eeb0cbd (patch)
treea2b83127f37ff1706e593f15299cd6e7347f788a /Makefile
parent6cb2de0a1f583ef8d018e430181a7414fa7faff1 (diff)
Geiles neues Buildsystem fuer die Assets
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..50d02c1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,29 @@
1CSS_FILES := $(shell find assets_src/css/ -maxdepth 1 -type f -name '*.css')
2CSS_FILES := $(addprefix assets/, $(CSS_FILES:assets_src/%=%))
3LESS_FILES := $(shell find assets_src/css/ -maxdepth 1 -type f -name '*.less')
4LESS_FILES := $(addprefix assets/, $(LESS_FILES:assets_src/%=%))
5LESS_FILES := $(LESS_FILES:.less=.css)
6JS_FILES := $(shell find assets_src/js/ -maxdepth 1 -type f -name '*.js')
7JS_FILES := $(addprefix assets/, $(JS_FILES:assets_src/%=%))
8
9all: $(CSS_FILES) $(LESS_FILES) $(JS_FILES)
10
11assets/css/%.css: assets_src/css/%.css
12 cp $< $@
13
14assets/js/%.css: assets_src/css/%.less
15 lessc $< > $@
16
17assets/js/%.js: assets_src/css/%.js
18 babel $< -o $@
19
20clean:
21 -rm -- $(CSS_FILES)
22 -rm -- $(LESS_FILES)
23 -rm -- $(JS_FILES)
24
25run: all
26 go run *.go
27
28.PHONY: all clear run
29