argument('name'); $this->info("Compiling RSX JavaScript bundle: {$bundle_name}"); try { // First scan the manifest $this->info("Scanning manifest..."); Manifest::scan(); // Compile the JavaScript bundle $compiler = new RsxJavaScriptCompiler(); $start = microtime(true); $result = $compiler->compile($bundle_name); $time = round(microtime(true) - $start, 2); $this->info("✓ Bundle compiled in {$time}s"); // Show results $this->info("\nBundle Information:"); $this->info(" Entry class: " . ($result['entry_class'] ?? 'None')); $this->info(" Files included: " . count($result['files'])); $this->info(" Bundle path: " . str_replace(base_path() . '/', '', $result['bundle_path'])); if ($this->option('verbose')) { $this->info("\nIncluded files:"); foreach ($result['files'] as $file) { $this->info(" - " . str_replace(base_path() . '/', '', $file)); } } // Show sample usage $this->info("\nUsage in Blade template:"); $this->info(" "); $this->info(" "); return 0; } catch (\Exception $e) { $this->error("Failed to compile bundle: " . $e->getMessage()); if ($this->option('verbose')) { $this->error($e->getTraceAsString()); } return 1; } } }