Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/components/commands/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
process.exit(1);
}

console.log('Launching shadcn/ui CLI...');
console.log('Source: https://ui.elevenlabs.io\n');
const component = componentName || 'all';
const targetUrl = new URL(`/r/${component}.json`, 'https://ui.elevenlabs.io').toString();

Check failure on line 18 in src/components/commands/add.ts

View workflow job for this annotation

GitHub Actions / Run linters

'URL' is not defined

// Prepare command arguments
const args = ['shadcn@latest', 'add'];
if (componentName) {
args.push(componentName);
}
console.log(`Installing ${component} from ElevenLabs UI registry...`);
console.log(`Source: ${targetUrl}\n`);

// Prepare command with custom registry URL
const fullCommand = `npx -y shadcn@latest add ${targetUrl}`;

// Run shadcn add command interactively
const result = spawnSync('npx', args, {
const result = spawnSync(fullCommand, {
stdio: 'inherit', // Allow interactive prompts
shell: true
});
Expand Down
Loading