From 3b6061215e1676cb8c8e3e4cd0ae5a75b7a0b493 Mon Sep 17 00:00:00 2001 From: Pushpak Chhajed Date: Wed, 8 Oct 2025 14:07:04 +0530 Subject: [PATCH 1/2] Ship setup script --- composer.json | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 0e686d58..54ef68cd 100644 --- a/composer.json +++ b/composer.json @@ -38,6 +38,22 @@ } }, "scripts": { + "setup": [ + "composer install", + "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"", + "@php artisan key:generate", + "@php artisan migrate --force", + "npm install", + "npm run build" + ], + "dev": [ + "Composer\\Config::disableProcessTimeout", + "npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others" + ], + "test": [ + "@php artisan config:clear --ansi", + "@php artisan test" + ], "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" @@ -52,14 +68,6 @@ "@php artisan key:generate --ansi", "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"", "@php artisan migrate --graceful --ansi" - ], - "dev": [ - "Composer\\Config::disableProcessTimeout", - "npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others" - ], - "test": [ - "@php artisan config:clear --ansi", - "@php artisan test" ] }, "extra": { From fdd876377cb0949cfd6be6bc6adf6ed644375e52 Mon Sep 17 00:00:00 2001 From: Pushpak Chhajed Date: Wed, 8 Oct 2025 14:16:13 +0530 Subject: [PATCH 2/2] Add pre-package-uninstall script to composer.json --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 54ef68cd..03965484 100644 --- a/composer.json +++ b/composer.json @@ -68,6 +68,9 @@ "@php artisan key:generate --ansi", "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"", "@php artisan migrate --graceful --ansi" + ], + "pre-package-uninstall": [ + "Illuminate\\Foundation\\ComposerScripts::prePackageUninstall" ] }, "extra": {