You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably looking at this from the wrong angle so apologies if this is already covered.
I have a collection of sub-generators (one to create a polymer element and one to do some company readme stuff for example) and they both have some shared values and some other values not shared.
IE Element Name is used in both but lets say I have some additional information in the readme which isn't needed to generate the element "Author" or similar.
My parent/wrapper generator can prompt for name and then pass that in as an option or argument to the sub generators. That means the option needs to be checked and logic put in all the generators to over-ride the prompting essentially right?
Would there be any value in having a convention that was built in to yeoman that allowed an option/argument to take precedence over a prompt in a way that is built in?
So basically I would pass in an argument called prompt-name or similar to https://github.com/Polymer/polymer-cli/blob/master/src/init/element/element.ts and it would know not to prompt the user for the name in this case to avoid a situation when a user gets prompted for the same information by 2 different sub-generators?
I understand we have the ability to do all of this now it's more just looking for a convention to reduce the overheard on the generators to handle the options/arguments and have a prescribed way of doing this behaviour in an easier way
The text was updated successfully, but these errors were encountered:
Perhaps it would also be possible in a situation were a generator always wants to prompt (and doesn't care if it's been asked before) to continute to do that by having a flag or an type of input-always and in this situation they may just want to use the supplied value as a default or something?
Hey
Probably looking at this from the wrong angle so apologies if this is already covered.
I have a collection of sub-generators (one to create a polymer element and one to do some company readme stuff for example) and they both have some shared values and some other values not shared.
IE Element Name is used in both but lets say I have some additional information in the readme which isn't needed to generate the element "Author" or similar.
My parent/wrapper generator can prompt for name and then pass that in as an option or argument to the sub generators. That means the option needs to be checked and logic put in all the generators to over-ride the prompting essentially right?
I saw https://www.npmjs.com/package/yeoman-option-or-prompt which offers a way to do that.
Would there be any value in having a convention that was built in to yeoman that allowed an option/argument to take precedence over a prompt in a way that is built in?
So basically I would pass in an argument called prompt-name or similar to https://github.com/Polymer/polymer-cli/blob/master/src/init/element/element.ts and it would know not to prompt the user for the name in this case to avoid a situation when a user gets prompted for the same information by 2 different sub-generators?
I understand we have the ability to do all of this now it's more just looking for a convention to reduce the overheard on the generators to handle the options/arguments and have a prescribed way of doing this behaviour in an easier way
The text was updated successfully, but these errors were encountered: