UNPKG

kawkab-frontend

Version:

Kawkab frontend is a frontend library for the Kawkab framework

20 lines (19 loc) • 801 B
import { execSync } from 'child_process'; import chalk from 'chalk'; export function devCommand(program) { program .command('dev') .description('Start the development server with live route generation.') .action(() => { console.log(chalk.cyan('šŸš€ Starting Kawkab development server...')); try { const command = 'npx concurrently -n "ROUTES,KAWKAB" -c "yellow.bold,blue.bold" "kawkab-frontend-generate-routes" "react-router dev"'; execSync(command, { stdio: 'inherit' }); } catch (error) { // Concurrently handles its own error messages, so we might not need a detailed log here. console.error(chalk.red('\nāŒ Development server stopped.')); process.exit(1); } }); }