Files
2026-07-24 14:59:44 +01:00

31 lines
789 B
PHP

<?php
namespace Modules\Developer\Console\Commands;
use Illuminate\Console\Command;
use Modules\Developer\Support\ThemeGenerator;
use Throwable;
final class MakeThemeCommand extends Command
{
protected $signature = 'theme:make {name} {--force}';
protected $description = 'Generate a theme scaffold with metadata, layout and assets.';
public function handle(ThemeGenerator $generator): int
{
try {
$files = $generator->generate($this->argument('name'), (bool) $this->option('force'));
} catch (Throwable $e) {
$this->error($e->getMessage());
return self::FAILURE;
}
foreach ($files as $file) {
$this->line("<info>created</info> {$file}");
}
return self::SUCCESS;
}
}