45 lines
1.4 KiB
Bash
Executable File
45 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Exit on error
|
|
set -e
|
|
|
|
echo "🚀 Setting up shadcn/ui components and dependencies..."
|
|
|
|
# Install required dependencies for shadcn
|
|
echo "📦 Installing required dependencies..."
|
|
npm install tailwindcss-animate class-variance-authority clsx tailwind-merge --legacy-peer-deps
|
|
|
|
# Initialize shadcn/ui (components.json already exists, so we'll skip this step)
|
|
echo "✅ components.json already exists"
|
|
|
|
# Set npm config to use legacy-peer-deps for all npm operations
|
|
echo "🔧 Setting npm to use legacy-peer-deps..."
|
|
npm config set legacy-peer-deps true
|
|
|
|
# Install base components
|
|
echo "🧩 Installing base shadcn/ui components..."
|
|
npx shadcn@latest add button -y
|
|
npx shadcn@latest add form -y
|
|
npx shadcn@latest add input -y
|
|
npx shadcn@latest add label -y
|
|
npx shadcn@latest add select -y
|
|
npx shadcn@latest add checkbox -y
|
|
npx shadcn@latest add card -y
|
|
npx shadcn@latest add dialog -y
|
|
npx shadcn@latest add popover -y
|
|
npx shadcn@latest add sonner -y
|
|
npx shadcn@latest add table -y
|
|
npx shadcn@latest add pagination -y
|
|
npx shadcn@latest add calendar -y
|
|
npx shadcn@latest add date-picker -y
|
|
npx shadcn@latest add skeleton -y
|
|
npx shadcn@latest add table -y
|
|
npx shadcn@latest add textarea -y
|
|
|
|
# Update any dependencies with legacy peer deps
|
|
echo "🔄 Updating dependencies..."
|
|
npm install --legacy-peer-deps
|
|
|
|
echo "✨ Setup complete! You can now use shadcn/ui components in your project."
|
|
echo "📚 Documentation: https://ui.shadcn.com/docs"
|