summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: a72a148176df6a63255d23b73c995671d1a909a5 (plain) (blame)
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
52
53
all: build

clean:
	@mkdir -p output
	@rm -rf output/*

build_fonts: clean
	@scripts/build_fonts.sh

build_sass: clean
	@scripts/build_sass.sh

build_content: clean
	@scripts/build_content.sh

build_only: build_fonts build_sass build_content

compress_gz: build_only
	@echo -e "\033[0;32m[COMPRESS]\033[0m Gzip"
	@pigz -R -k -9 -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\)'`

compress_br: build_only
	@echo -e "\033[0;32m[COMPRESS]\033[0m Brotli"
	@brotli -k -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\|woff\\)'`

build: compress_gz compress_br

watch_sass: build_only
	@scripts/watch_sass.sh

watch_content: build_only
	@scripts/watch_content.sh

watch_templates: build_only
	@scripts/watch_templates.sh

watch_metadata: build_only
	@scripts/watch_metadata.sh

watch_filters: build_only
	@scripts/watch_filters.sh

watch: watch_sass watch_content watch_templates watch_metadata watch_filters

serve_only: build_only
	@python -m http.server --bind 127.0.0.1 --directory output

serve: watch serve_only

deploy: build
	@scripts/deploy.sh

.PHONY: all clean build watch serve deploy