Closed mackoj closed 3 years ago
The goal of this PR is to allow to run scripts on generated code after the generation.
You will need to add postGenerationScript: ["<script call here>", "<another script>"] in your template.yml file in order for it to work.
postGenerationScript: ["<script call here>", "<another script>"]
This is an exemple of what it can do.
postGenerationScript: ["swift-format -m format -r -i __DESTNATION_PATH__"] # script to execute post generation
Adding this will reformat the generated code with swift-format.
For the moment it only have one context variable __DESTNATION_PATH__ that will transform into the final destinationPath.
__DESTNATION_PATH__
I hope it helps.
The goal of this PR is to allow to run scripts on generated code after the generation.
You will need to add
postGenerationScript: ["<script call here>", "<another script>"]
in your template.yml file in order for it to work.This is an exemple of what it can do.
Adding this will reformat the generated code with swift-format.
For the moment it only have one context variable
__DESTNATION_PATH__
that will transform into the final destinationPath.I hope it helps.