-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
33 lines (27 loc) · 899 Bytes
/
justfile
File metadata and controls
33 lines (27 loc) · 899 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
run:
saga dev
# Remove generated responsive hero image variants
clean:
rm -f content/articles/heroes/*-315w.webp content/articles/heroes/*-630w.webp content/articles/heroes/*-740w.webp content/articles/heroes/*-1480w.webp
# Generate responsive hero image variants (315w, 630w, 740w, 1480w)
resize:
#!/usr/bin/env bash
cd content/articles/heroes
for img in *.webp; do
# Skip already-generated variants
[[ "$img" =~ -[0-9]+w\.webp$ ]] && continue
base="${img%.webp}"
for size in 315 630 740 1480; do
variant="${base}-${size}w.webp"
if [[ ! -f "$variant" ]]; then
echo "Generating: $variant"
magick "$img" -resize "${size}x" -strip -quality 85 -define webp:method=6 "$variant"
fi
done
done
compile:
swift package resolve && swift build --product Loopwerk
build:
.build/debug/Loopwerk
format:
swiftformat --swift-version 6 .