From c3fcec0951b91bdb2d5bc28cf7e3d5392ed0d0e0 Mon Sep 17 00:00:00 2001 From: Dennis Elsinga Date: Wed, 25 Sep 2024 17:44:41 +0200 Subject: [PATCH 1/3] Add composer review script for codebase checks --- README.md | 8 ++++++++ composer.json | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/README.md b/README.md index cec82b6..d3db058 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,14 @@ DEFAULT_USER_EMAIL="admin@example.com" DEFAULT_USER_PASSWORD="password" ``` +## Composer Review +A composer script `composer review` is available to run the following commands to ensure the codebase is clean and ready for deployment. Of course, you can run these commands individually as well. + +```bash +./vendor/bin/pest --parallel +./vendor/bin/pint +./vendor/bin/phpstan analyse +``` ## [Helpers](https://laravel-news.com/creating-helpers) I've set up a Helper file for you to use in your Laravel app. You can find it at `app\Helpers.php`. This file is ready for you to add your custom helper functions, which Composer will automatically include in your project. diff --git a/composer.json b/composer.json index e1da213..4cd5ccf 100644 --- a/composer.json +++ b/composer.json @@ -49,6 +49,9 @@ } }, "scripts": { + "pest": "./vendor/bin/pest --parallel", + "pint": "./vendor/bin/pint", + "phpstan": "./vendor/bin/phpstan analyse", "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi", @@ -65,6 +68,11 @@ "@php artisan key:generate --ansi", "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"", "@php artisan migrate --graceful --ansi" + ], + "review": [ + "@pint", + "@pest", + "@phpstan" ] }, "extra": { From fe7bbbd0849d51a7e564fbed47a4f09bae5212c5 Mon Sep 17 00:00:00 2001 From: Dennis Elsinga Date: Wed, 25 Sep 2024 17:45:53 +0200 Subject: [PATCH 2/3] Improve composer review script description --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index d3db058..fc64e6e 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,7 @@ DEFAULT_USER_PASSWORD="password" ``` ## Composer Review -A composer script `composer review` is available to run the following commands to ensure the codebase is clean and ready for deployment. Of course, you can run these commands individually as well. - +A composer script `composer review` is available to run the following commands to ensure the codebase is clean and ready for deployment: ```bash ./vendor/bin/pest --parallel ./vendor/bin/pint From eba2f975e5ac9ca2a5fa5f9f708dc4cb7aff3362 Mon Sep 17 00:00:00 2001 From: CodeWithDennis <23448484+CodeWithDennis@users.noreply.github.com> Date: Wed, 25 Sep 2024 18:51:30 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fc64e6e..d70d4c5 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,14 @@ DEFAULT_USER_PASSWORD="password" ``` ## Composer Review -A composer script `composer review` is available to run the following commands to ensure the codebase is clean and ready for deployment: +A composer script `composer review` is available to run the following commands to ensure the codebase is clean and ready for deployment. + +```bash +composer review +``` + +The script will run the following commands: + ```bash ./vendor/bin/pest --parallel ./vendor/bin/pint