kebab($name);
$root = rtrim(config('developer.themes_path', resource_path('themes')), '/').'/'.$name;
$files = [
"$root/theme.json" => json_encode(['name' => str($name)->headline()->toString(), 'slug' => $name, 'version' => '1.0.0', 'parent' => 'common'], JSON_PRETTY_PRINT).PHP_EOL,
"$root/views/layouts/app.blade.php" => "getLocale()) }}\">
{{ \$title ?? config('app.name') }}@vite(['resources/css/app.css', 'resources/js/app.js']){{ \$slot }}\n",
"$root/views/home.blade.php" => "{{ config('app.name') }}
\n",
"$root/assets/css/theme.css" => ":root { --theme-radius: 0.5rem; }\n",
"$root/README.md" => "# ".str($name)->headline()." Theme\n\nGenerated by `php artisan theme:make {$name}`.\n",
];
foreach ($files as $path => $contents) { $this->write($path, $contents, $force); }
return array_keys($files);
}
}