move into sonardesk
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user