Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,17 @@ php artisan essentials:pint {--force} {--backup}
- `--force` - Overwrites the existing configuration file without asking for confirmation.
- `--backup` - Creates a backup of the existing configuration file.

#### `essentials:add-scripts`

Automatically configures your Laravel project with standardized composer scripts for testing, linting, and other development tasks. This command analyzes your project's dependencies and adds appropriate scripts to your `composer.json` file.

```bash
php artisan essentials:add-scripts {--skip-checks} {--existing-test-commands=ask}
```

*Options:*
- `--skip-checks` - Bypasses dependency checks and adds all available scripts to your composer.json, even if the required packages aren't installed. This is useful for creating a complete script structure before installing tools or for standardizing scripts across multiple projects.
- `--existing-test-commands` - Controls how to handle existing test commands in your composer.json file. Accepts three values: 'ask' (interactive prompts for each command, default), 'keep' (preserve all existing commands), or 'remove' (replace with the new essential commands).

## Configuration

Expand Down
41 changes: 41 additions & 0 deletions config/essentials.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

declare(strict_types=1);

return [
/*
|--------------------------------------------------------------------------
| Minimum Test Coverage
|--------------------------------------------------------------------------
|
| This value is the minimum percentage of code coverage required for tests
| to pass. If not set, the minimum_test value will be used as a fallback.
| If the coverage is below this threshold, the test run will fail.
|
*/
'minimum_test_coverage' => 40,

/*
|--------------------------------------------------------------------------
| Minimum Type Coverage
|--------------------------------------------------------------------------
|
| This value is the minimum percentage of type coverage required for tests
| to pass. If not set, the minimum_test value will be used as a fallback.
| If the type coverage is below this threshold, the test run will fail.
|
*/
'minimum_type_coverage' => 100,

/*
|--------------------------------------------------------------------------
| Minimum Test
|--------------------------------------------------------------------------
|
| This value is the minimum percentage required for general test metrics.
| It also serves as a fallback value for minimum_test_coverage and
| minimum_type_coverage when those are not explicitly set.
|
*/
'minimum_test' => 40,
];
Loading