UNPKG

kawkab-frontend

Version:

Kawkab frontend is a frontend library for the Kawkab framework

21 lines (20 loc) • 789 B
import chalk from 'chalk'; import { detectPackageManager, run } from '../utils/helpers.js'; export function syncCommand(program) { program .command('sync') .description('Sync web assets with native mobile platforms (Capacitor).') .action(() => { console.log(chalk.blue('šŸš€ Syncing web build with native platforms...')); try { const packageManager = detectPackageManager(); const capCmd = packageManager === 'bun' ? 'bun cap' : 'npx cap'; run(`${capCmd} sync`); console.log(chalk.green('āœ… Sync complete!')); } catch (error) { console.error(chalk.red('\nāŒ Sync failed. Did you run the static build first?'), error); process.exit(1); } }); }