diff --git a/Skeletorfile.php b/Skeletorfile.php deleted file mode 100644 index 90d293c..0000000 --- a/Skeletorfile.php +++ /dev/null @@ -1,95 +0,0 @@ -intro('Welcome to Larament setup! Let\'s get started.'); - - $applicationName = $skeletor->text('What is the application name?', 'Laravel', required: true); - - $applicationDescription = $skeletor->text('What is the application description?', 'A cool Laravel application'); - - $timezone = $skeletor->search( - 'Which timezone would you like to use?', - fn (string $query) => collect(timezone_identifiers_list()) - ->filter(fn (string $timezone) => str_contains(strtolower($timezone), strtolower($query))) - ->values() - ->all() - ); - - $adminPanelColor = $skeletor->select('What color would you like to use for the FilamentPHP admin panel?', - collect(Color::all()) - ->keys() - ->map(fn (string $color) => ucfirst($color)) - ->flatten() - ->values() - ->toArray() - ); - - $skeletor->intro('Let\'s setup the default user that will be created.'); - - $name = $skeletor->text('What is the demo username?', 'John Doe', required: true); - - $email = $skeletor->text('What is the demo email?', 'admin@example.com', required: true); - - $password = $skeletor->password('What is the demo password?', 'password', required: true); - - if ($applicationName) { - $skeletor->pregReplaceInFile('/^APP_NAME=(.*)$/m', 'APP_NAME="'.$applicationName.'"', '.env'); - } - - if ($applicationDescription) { - $skeletor->pregReplaceInFile( - '/"description":\s*".*?"/', - '"description": "'.addslashes($applicationDescription).'"', - 'composer.json' - ); - } - - if ($name) { - $skeletor->pregReplaceInFile('/^DEFAULT_USER_NAME=(".*?"|[^"\s]*|)$/m', 'DEFAULT_USER_NAME="'.$name.'"', '.env'); - } - - if ($email) { - $skeletor->pregReplaceInFile('/^DEFAULT_USER_EMAIL=(".*?"|[^"\s]*|)$/m', 'DEFAULT_USER_EMAIL="'.$email.'"', '.env'); - } - - if ($password) { - $skeletor->pregReplaceInFile('/^DEFAULT_USER_PASSWORD=(".*?"|[^"\s]*|)$/m', 'DEFAULT_USER_PASSWORD="'.$password.'"', '.env'); - } - - if ($timezone) { - $skeletor->pregReplaceInFile('/^APP_TIMEZONE=(".*?"|[^"\s]*|)$/m', 'APP_TIMEZONE="'.$timezone.'"', '.env'); - } - - if ($adminPanelColor) { - $skeletor->pregReplaceInFile( - "/'primary'\s*=>\s*Color::[A-Za-z0-9]+/", - "'primary' => Color::".$adminPanelColor, - 'app/Providers/Filament/AdminPanelProvider.php' - ); - } - - if ($skeletor->exists('README.md')) { - $skeletor->removeFile('README.md'); - } - - if ($skeletor->exists('resources/images/larament.png')) { - $skeletor->removeFile('resources/images/larament.png'); - } - - if ($skeletor->exists('resources/images/pest-php.png')) { - $skeletor->removeFile('resources/images/pest-php.png'); - } - - if ($skeletor->exists('resources/images/user-global-search.jpg')) { - $skeletor->removeFile('resources/images/user-global-search.jpg'); - } - - if ($skeletor->exists('resources/images/global-search-keybinding.jpg')) { - $skeletor->removeFile('resources/images/global-search-keybinding.jpg'); - } - - $skeletor->outro('Setup completed! Enjoy your new Laravel and FilamentPHP application.'); -}; diff --git a/composer.json b/composer.json index 55eaa61..106202f 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ "timokoerber/laravel-one-time-operations": "^1.4" }, "require-dev": { - "aniftyco/skeletor": "0.1.0", "barryvdh/laravel-debugbar": "^3.13", "fakerphp/faker": "^1.23", "larastan/larastan": "^2.0", @@ -67,7 +66,6 @@ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ - "NiftyCo\\Skeletor\\Runner::execute", "@php artisan key:generate --ansi", "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"", "@php artisan migrate --graceful --ansi", diff --git a/composer.lock b/composer.lock index cf12447..1d59ec8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ebd8a274979ec21b5d8d62b9f57cad8a", + "content-hash": "526f074817700c71c22ac6bb3c0d5e29", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -7606,64 +7606,6 @@ } ], "packages-dev": [ - { - "name": "aniftyco/skeletor", - "version": "v0.1.0", - "source": { - "type": "git", - "url": "https://github.com/aniftyco/skeletor.git", - "reference": "7b4020f35861404a7a48d0fd976ef20e54e724b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/aniftyco/skeletor/zipball/7b4020f35861404a7a48d0fd976ef20e54e724b0", - "reference": "7b4020f35861404a7a48d0fd976ef20e54e724b0", - "shasum": "" - }, - "require": { - "laravel/prompts": "^0.3.1", - "php": "^8.1", - "symfony/process": "^7.1" - }, - "require-dev": { - "composer/composer": "^2.8", - "illuminate/collections": "^11.30", - "laravel/pint": "^1.18", - "pestphp/pest": "^3.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "NiftyCo\\Skeletor\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "NiftyCo, LLC", - "homepage": "https://aniftyco.com" - }, - { - "name": "Josh Manders", - "homepage": "https://x.com/joshmanders" - } - ], - "description": "Summon Skeletor's minion: a Composer companion to unleash extra functionality with every `create-project` command.", - "homepage": "https://github.com/aniftyco/skeletor", - "keywords": [ - "Skeleton", - "composer", - "create-project" - ], - "support": { - "issues": "https://github.com/aniftyco/skeletor/issues", - "source": "https://github.com/aniftyco/skeletor/tree/v0.1.0" - }, - "time": "2024-11-17T19:50:00+00:00" - }, { "name": "barryvdh/laravel-debugbar", "version": "v3.14.9",