kawkab-frontend
Version:
Kawkab frontend is a frontend library for the Kawkab framework
20 lines (19 loc) ⢠801 B
JavaScript
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);
}
});
}