diff --git a/box.json.dist b/box.json.dist index 458b6ea..145033b 100644 --- a/box.json.dist +++ b/box.json.dist @@ -4,6 +4,7 @@ "versa" ], "directories": [ + "src", "vendor" ], "check-requirements": true, diff --git a/src/Enum/ProjectType.php b/src/Enum/ProjectType.php new file mode 100644 index 0000000..2927a72 --- /dev/null +++ b/src/Enum/ProjectType.php @@ -0,0 +1,12 @@ +setCode(function (InputInterface $input): int { switch ($input->getArgument('command')) { case 'build': switch ($input->getOption('type')) { - case 'sculpin': + case ProjectType::Sculpin->value: $process = new Process(command: array_filter(['./vendor/bin/sculpin', 'generate', $extraArgs])); $process->setTty(true); $process->setWorkingDirectory($workingDir); @@ -78,7 +79,7 @@ $application->setCode(function (InputInterface $input): int { $process->run(); } else { switch ($input->getOption('type')) { - case 'sculpin': + case ProjectType::Sculpin->value: $process = new Process(command: array_filter(['./vendor/bin/sculpin', 'generate', '--server', '--watch', $extraArgs])); $process->setTimeout(null); $process->setTty(true);