Files
lcbp3.np-dms.work/generate-shadcn-components.yml
2025-10-05 11:57:43 +07:00

27 lines
942 B
YAML

services:
setup-shadcn:
image: node:24-alpine
working_dir: /app
volumes:
- /share/Container/dms/frontend:/app
user: "${UID:-1000}:${GID:-1000}"
command: >
sh -c "
echo '...installing dependencies...' &&
npm install &&
echo '...initiallizing shadcn/ui...' &&
npx shadcn@latest init -y -d &&
echo '...adding components...' &&
npx shadcn@latest add -y alัert dialog checkbox scroll-area button label input card badge tabs progress dropdown-menu tooltip switch &&
echo '✅ Done! Check components/ui/ directory'
"
# วิธีใช้:
# cd /share/Container/dms
# UID=$(id -u) GID=$(id -g) docker compose -f generate-shadcn-components.yml run --rm setup-shadcn
#
# หลังจากนั้น commit ไฟล์เหล่านี้:
# - components/ui/*.tsx (หรือ .jsx)
# - lib/utils.ts (หรือ .js)
# - components.json