When adding features to an Exosphere application
I want to be able to scaffold new services based on templates defined by the tech lead
So that I can get started quickly with the correct service structure.
running "exo add" adds a new service to the current application
the available templates are in the ".exosphere" folder of the code base
the command asks which template to use
the command asks for information it needs for the chosen template
the command is written in Go
the command uses Boilr to execute the templates
Scenario:
Given I am in the root directory of an empty Exosphere application
And my codebase contains the template folder ".exosphere/foo" with the files:
| NAME | CONTENT |
| project.json | { "Name": "foo" } |
| template/{{Name}}/foo.md | This is the {{Name}} service |
When running "exo add" and entering the values:
| PROGRAM OUTPUT | TEXT ENTERED |
| which template to use | 1 |
| Please choose a value for "Name" | my-service |
Then it creates the file "my-service/foo.md" with the content:
"""
This is the my-service service
"""
And my "application.yml" file now has the content:
"""
...
"""