-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 758 Bytes
/
Makefile
File metadata and controls
39 lines (31 loc) · 758 Bytes
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
ifeq ($(OS),Windows_NT)
uname_S := Windows
else
uname_S := $(shell uname -s)
endif
.PHONY: serve
serve:
zine --port 1313
.PHONY: lint
lint:
npx prettier@2.7.1 --write src
.PHONY: run
run:
zig build run-all --summary all
.PHONY: install-deps
install-deps:
ifeq ($(uname_S), Darwin)
# sqlite3 is preinstalled on macOS
brew install pkgconf libpq mysql-client
endif
ifeq ($(uname_S), Linux)
sudo apt install -y pkg-config libsqlite3-dev libpq-dev libmysqlclient-dev
endif
.PHONY: clean
clean:
rm -rf zig-out zig-cache
EXCLUDE = --exclude "*webp" --exclude "*svg" --exclude "*gif"
.PHONY: webp
webp:
fd -t f $(EXCLUDE) --full-path './assets/images' --exec convert {} {.}.webp \;
fd -t f $(EXCLUDE) --full-path './assets/images' --exec rm {} \;