mirror of
https://git.mills.io/prologic/zs
synced 2024-11-25 06:46:11 +03:00
20 lines
341 B
Bash
Executable File
20 lines
341 B
Bash
Executable File
#!/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#"/"}"
|
|
#name="${name%.*}"
|
|
#minify -o "${p}/${name}.min.$t" "$file"
|
|
minify -o "${p}/${name}" "$file"
|
|
done
|
|
}
|
|
|
|
minify_assets "$ZS_OUTDIR" "css"
|
|
minify_assets "$ZS_OUTDIR" "js"
|