-
1. Re: Is it possible to prompt for user input/selection from list of options like Yeoman generators?
gastaldi Mar 15, 2016 5:28 PM (in response to donovan_muller)Hi Donovan, could you give an example on what you are looking for?
I`d say that the answer is: Yes, Forge has these APIs , but I'd need more information and perhaps provide you a working example.
Tip: Type project-new without any parameters and you should see how Forge prompts for the required values.
Thanks!
-
2. Re: Is it possible to prompt for user input/selection from list of options like Yeoman generators?
donovan_muller Mar 15, 2016 5:40 PM (in response to gastaldi)Thanks for the quick reply George,
I'm evaluating Forge for generating new projects with a common base structure and configuration.
As part of generating these new projects I would like to prompt the developers on what to include in the project.
My thinking is that it would be easier from a UX perspective to present a list (like Yeoman for e.g.) of options that they could select:
E.g.
[x] project-new ...
What kind of project is this?
[_] RESTful web application
[_] Stream based application
[X] Utility JAR
...
then based on the selection the correct project structure would be generated.
I see there is an interactive mode:
and was wondering if that can be used/extended to support the above scenario?
-
4. Re: Is it possible to prompt for user input/selection from list of options like Yeoman generators?
gastaldi Mar 15, 2016 6:22 PM (in response to donovan_muller)Yes, it can. You need to use a UISelectMany input type. See how they work at https://github.com/forge/core/blob/master/ui/README.asciidoc#ui-components