feat: create a justfile

Refs: #18
This commit is contained in:
Oliver Davies 2023-02-21 08:29:09 +00:00
parent 34810088c3
commit fa1774b550
2 changed files with 16 additions and 0 deletions

View file

@ -115,6 +115,7 @@ final class BuildConfigurationCommand extends Command
$this->filesToGenerate->push(['env.example', '.env.example']);
$this->filesToGenerate->push(['Dockerfile', 'Dockerfile']);
$this->filesToGenerate->push(['justfile', 'justfile']);
if (isset($configurationData['dockerCompose']) && $configurationData['dockerCompose'] !== null) {
$this->filesToGenerate->push(['docker-compose.yaml', 'docker-compose.yaml']);

15
templates/justfile.twig Normal file
View file

@ -0,0 +1,15 @@
default:
@just --list
{% if "php" is same as language %}
composer *args:
{{ "just _exec php composer {{ args }}" | raw }}
{% endif %}
{% if "drupal-project" is same as type %}
drush *args:
{{ "just _exec php drush {{ args }}" | raw }}
{% endif %}
_exec +args:
{{ "docker compose exec {{ args }}" | raw }}