blob: a704dbb48c9b5a8bc857865128afd6a905b24668 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
PY?=python
SERVERMODULE=http.server
ifeq ($(PY), tauthon)
SERVERMODULE = SimpleHTTPServer
else ifeq ($(PY), python2)
SERVERMODULE = SimpleHTTPServer
else ifeq ($(PY), python3)
SERVERMODULE = http.server
endif
help:
@echo 'Makefile for generate styles, fonts, icons, js to simple '
@echo ' '
@echo 'Usage: '
@echo ' make all compile all frontend '
@echo ' make clean delete all fonts, icons, styles, js '
@echo ' make icons compile icons '
@echo ' make styles compile custom styles '
@echo ' make fonts generate fonts '
@echo ' make js compile javascript files '
@echo ' make serve [PY=python] [PORT=8000] serve site at http://localhost:8000 '
@echo ' '
all: generate
generate: clean fonts icons styles js
clean:
@rm -rf dist/
fonts:
@bash scripts/fonts.bash
icons:
@bash scripts/icons.bash
styles:
@bash scripts/normalize.bash
@bash scripts/home.bash
@bash scripts/post.bash
js:
@bash scripts/js.bash
serve: generate
ifdef PORT
$(PY) -m $(SERVERMODULE) $(PORT)
else
$(PY) -m $(SERVERMODULE)
endif
|