-
Notifications
You must be signed in to change notification settings - Fork 5
/
monorepo-builder.php
56 lines (51 loc) · 1.61 KB
/
monorepo-builder.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
declare(strict_types=1);
use Symplify\MonorepoBuilder\ComposerJsonManipulator\ValueObject\ComposerJsonSection;
use Symplify\MonorepoBuilder\Config\MBConfig;
return static function (MBConfig $config): void {
$config->defaultBranch('1.x');
$config->packageDirectories([
__DIR__ . '/src',
]);
$config->dataToAppend([
ComposerJsonSection::SCRIPTS => [
"build" => [
"@static:analyze",
"@test",
"@test:mutation"
],
"test" => [
"tools/vendor/bin/phpunit"
],
"test:mutation" => [
"tools/vendor/bin/infection -j2"
],
"static:analyze" => [
"tools/vendor/bin/psalm.phar --output-format=compact",
"tools/vendor/bin/phpstan analyze -c phpstan.neon",
"tools/vendor/bin/php-cs-fixer fix --dry-run"
],
"cs:php:fix" => [
"tools/cs-fixer/vendor/bin/php-cs-fixer fix"
],
"post-install-cmd" => [
"@tools:install"
],
"post-update-cmd" => [
"@tools:install"
],
"tools:install" => [
"composer install --working-dir=./tools",
]
]
]);
$config->dataToRemove([
ComposerJsonSection::REQUIRE_DEV => [
"phpunit/phpunit" => "*",
"infection/infection" => "*",
"friendsofphp/php-cs-fixer" => "*",
"phpstan/phpstan" => "*",
"vimeo/psalm" => "*",
]
]);
};