-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
51 lines (37 loc) · 1.23 KB
/
Makefile
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
PLANTUML=docker run -i --rm plantuml/plantuml
PUML=$(wildcard *.puml */*.puml */*/*.puml */*/*/*.puml */*/*/*/*.puml)
PUML_LIGHT_SVG=$(patsubst %.puml, %.light.svg, $(PUML))
PUML_DARK_SVG=$(patsubst %.puml, %.dark.svg, $(PUML))
REKAPAGER_SRC=$(wildcard static-src/rekapager/*.png)
REKAPAGER_DST=$(patsubst static-src/rekapager/%.png, static/rekapager/%.png, $(REKAPAGER_SRC))
all: static/img/social.png diagrams
static/img/social.png: src/images/social.svg
inkscape -o $@ -w 1200 -h 600 $<
.PHONY: start
start:
npx docusaurus start
.PHONY: build
build:
npx docusaurus build
.PHONY: serve
serve:
npx docusaurus serve
.PHONY: clean
clean: clean-diagrams
npx docusaurus clear
.PHONY: clean-diagrams
clean-diagrams:
rm -f $(PUML_LIGHT_SVG) $(PUML_DARK_SVG)
.PHONY: rekapager
rekapager: $(REKAPAGER_DST)
.PHONY: static/rekapager/%.png
static/rekapager/%.png: static-src/rekapager/%.png
convert $< -alpha set -fuzz 3% -transparent '#ffffff' -shave 60x60 -resize 25% $@
.PHONY: diagrams
diagrams: $(PUML_LIGHT_SVG) $(PUML_DARK_SVG)
.PHONY: %.light.svg
%.light.svg: %.puml
$(PLANTUML) -pipe -tsvg -SbackgroundColor=transparent < $< > $@
.PHONY: %.dark.svg
%.dark.svg: %.puml
$(PLANTUML) -pipe -tsvg -darkmode -SbackgroundColor=transparent < $< > $@