More flexibility and guidance in the spin new
experience
#807
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, a developer new to Spin and wanting to create an application needs to manually install templates, and needs to know the ID of the template they want to use.
This PR makes it optional to pass the template ID on the command line. If the template ID is omitted,
spin new
prompts with a list of installed templates:Additionally, if
spin new
needs to prompt but no templates are installed,spin new
offers to install the "default" set:If the template ID and project name are passed on the command line,
spin new
continues to behave as it did before.Note: Because the ID and project name are positional args, this PR necessarily also makes the name optional. It will be prompted for if not provided. This creates an additional experience of
spin new <template_id>
where you will be prompted for the name but not the template. I don't think this is vastly valuable but it's benign so I haven't worried about it.Signed-off-by: itowlson [email protected]