blob: 50d02c1f30ab397aaa0e6204116b2e04f38f75a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
CSS_FILES := $(shell find assets_src/css/ -maxdepth 1 -type f -name '*.css')
CSS_FILES := $(addprefix assets/, $(CSS_FILES:assets_src/%=%))
LESS_FILES := $(shell find assets_src/css/ -maxdepth 1 -type f -name '*.less')
LESS_FILES := $(addprefix assets/, $(LESS_FILES:assets_src/%=%))
LESS_FILES := $(LESS_FILES:.less=.css)
JS_FILES := $(shell find assets_src/js/ -maxdepth 1 -type f -name '*.js')
JS_FILES := $(addprefix assets/, $(JS_FILES:assets_src/%=%))
all: $(CSS_FILES) $(LESS_FILES) $(JS_FILES)
assets/css/%.css: assets_src/css/%.css
cp $< $@
assets/js/%.css: assets_src/css/%.less
lessc $< > $@
assets/js/%.js: assets_src/css/%.js
babel $< -o $@
clean:
-rm -- $(CSS_FILES)
-rm -- $(LESS_FILES)
-rm -- $(JS_FILES)
run: all
go run *.go
.PHONY: all clear run
|