1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-22 01:44:25 +04:00
Files
tabler/build/capture-components.sh
2020-01-12 19:39:19 +01:00

12 lines
481 B
Bash
Executable File

rm -rf ../static/img/components/*
for file in ../pages/_components/*.html; do
file="$(basename -- $file)"
file="${file%.html}"
url="http://localhost:3001/components/$file.html"
echo $url
capture-website $url --element="#component-wrapper" --scale-factor=2 >../static/img/components/$file.png
convert ../static/img/components/$file.png -gravity Center -crop 1648x824-0-0! -background "#F5F7FB" -flatten +repage -resize 1280x640 ../static/img/components/$file.png
done