managment frontend initiated
This commit is contained in:
41
WebServices/client-frontend/setup-shadcn.sh
Executable file
41
WebServices/client-frontend/setup-shadcn.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/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 --yes
|
||||
npx shadcn@latest add form --yes
|
||||
npx shadcn@latest add input --yes
|
||||
npx shadcn@latest add label --yes
|
||||
npx shadcn@latest add select --yes
|
||||
npx shadcn@latest add checkbox --yes
|
||||
npx shadcn@latest add card --yes
|
||||
npx shadcn@latest add dialog --yes
|
||||
npx shadcn@latest add popover --yes
|
||||
npx shadcn@latest add sonner --yes
|
||||
npx shadcn@latest add table --yes
|
||||
npx shadcn@latest add pagination --yes
|
||||
npx shadcn@latest add calendar --yes
|
||||
npx shadcn@latest add date-picker --yes
|
||||
|
||||
# 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"
|
||||
Reference in New Issue
Block a user