1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00
Files
tabler/build/capture-components.sh
2019-10-07 23:20:17 +02:00

13 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