mirror of
https://git.mills.io/prologic/zs.git
synced 2024-09-07 12:44:15 -04:00
18 lines
273 B
Plaintext
18 lines
273 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
set -e
|
||
|
|
||
|
minify_assets() {
|
||
|
p="$1"
|
||
|
t="$2"
|
||
|
|
||
|
find "$p" -type f -name "*.$t" | while read -r file; do
|
||
|
name="${file#"$p"}"
|
||
|
name="${name#"/"}"
|
||
|
minify -o "${p}/${name}" "$file"
|
||
|
done
|
||
|
}
|
||
|
|
||
|
minify_assets "$ZS_OUTDIR" "css"
|
||
|
minify_assets "$ZS_OUTDIR" "js"
|