templating icon indicating copy to clipboard operation
templating copied to clipboard

Template automation. Auto generate PowerShell script files by parsing the `template.json` parameters. PS supports positional parameters.

Open egvijayanand opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

https://egvijayanand.in/2024/02/09/dotnet-maui-item-templates-made-easy-on-cli-and-visual-studio-code/

To make the user experience with .NET CLI item templates much easier, have manually generated PowerShell scripts that match that of my custom template design.

But this can be automated to a certain extent like generating the PS script stub with the info from the template.json file.

Then developer can fine-tune it and add it to the package for distribution.

Like .NET CLI tools, a path can be designated to these scripts, and that path added to the Path environment variable so that it is available anywhere to invoke.

Describe the solution you'd like.

Auto-generated PowerShell script files by parsing the template.json parameters.

The distribution of those PS scripts to the end-user machine along with the CLI template NuGet package.

Additional context

Template automation.

egvijayanand avatar Feb 08 '24 20:02 egvijayanand

We already support completion for templates based on their template.jsom files through the NET CLI's tab-completion mechanism. Have you tried that? It's platform-agnostic and shell-agnostic.

baronfel avatar Feb 08 '24 20:02 baronfel