1
0
Files
breadcrumb-the-shire/lib/Console/Commands/Module/BuildCommand.php
fs 7121732fcf refactor(cli)!: hard-cut legacy scripts and standardize console runtime
- remove legacy bin/module-*.php and bin/doctor.php entry scripts

- move module/doctor execution into class-based runners under lib/Console

- add stable JSON output for doctor and module:sync

- introduce bin/dev for init/up/down/logs/console/qa workflow

- update DI wiring, phpstan scan config, tests, and docs to new CLI contract
2026-04-01 17:14:20 +02:00

37 lines
988 B
PHP

<?php
namespace MintyPHP\Console\Commands\Module;
final class BuildCommand extends AbstractModuleCommand
{
public function name(): string
{
return 'module:build';
}
public function description(): string
{
return 'Build runtime page root with module symlinks';
}
public function execute(array $args, array $options): int
{
$result = $this->moduleRunner()->build();
if ($result['status'] === 'ok') {
fwrite(STDOUT, sprintf(
"module-build: runtime pages built - %d core entries + %d module entries.\n",
$result['core_entries'],
$result['module_entries']
));
} else {
fwrite(STDERR, $result['message'] . PHP_EOL);
}
if ($result['message'] !== 'module-build: ok' && $result['status'] === 'ok') {
fwrite(STDOUT, $result['message'] . PHP_EOL);
}
return (int) $result['exit_code'];
}
}