aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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