diff options
author | rtz12 <koenig@fagott.pw> | 2016-01-17 21:31:12 (UTC) |
---|---|---|
committer | rtz12 <koenig@fagott.pw> | 2016-01-17 21:31:12 (UTC) |
commit | 72ad0e53f3887b5ad74034a99c6453a88eeb0cbd (patch) | |
tree | a2b83127f37ff1706e593f15299cd6e7347f788a /Makefile | |
parent | 6cb2de0a1f583ef8d018e430181a7414fa7faff1 (diff) |
Geiles neues Buildsystem fuer die Assets
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
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 @@ | |||
1 | CSS_FILES := $(shell find assets_src/css/ -maxdepth 1 -type f -name '*.css') | ||
2 | CSS_FILES := $(addprefix assets/, $(CSS_FILES:assets_src/%=%)) | ||
3 | LESS_FILES := $(shell find assets_src/css/ -maxdepth 1 -type f -name '*.less') | ||
4 | LESS_FILES := $(addprefix assets/, $(LESS_FILES:assets_src/%=%)) | ||
5 | LESS_FILES := $(LESS_FILES:.less=.css) | ||
6 | JS_FILES := $(shell find assets_src/js/ -maxdepth 1 -type f -name '*.js') | ||
7 | JS_FILES := $(addprefix assets/, $(JS_FILES:assets_src/%=%)) | ||
8 | |||
9 | all: $(CSS_FILES) $(LESS_FILES) $(JS_FILES) | ||
10 | |||
11 | assets/css/%.css: assets_src/css/%.css | ||
12 | cp $< $@ | ||
13 | |||
14 | assets/js/%.css: assets_src/css/%.less | ||
15 | lessc $< > $@ | ||
16 | |||
17 | assets/js/%.js: assets_src/css/%.js | ||
18 | babel $< -o $@ | ||
19 | |||
20 | clean: | ||
21 | -rm -- $(CSS_FILES) | ||
22 | -rm -- $(LESS_FILES) | ||
23 | -rm -- $(JS_FILES) | ||
24 | |||
25 | run: all | ||
26 | go run *.go | ||
27 | |||
28 | .PHONY: all clear run | ||
29 | |||