hubotio / generator-hubot

Hubot generator for Yeoman
MIT License
156 stars 83 forks source link

Support for yeoman generator arguments? #12

Closed alexanderjardim-zz closed 9 years ago

alexanderjardim-zz commented 9 years ago

Is there any way I can use "yo hubot" from a script like bash, Dockerfile, ansible, etc and pass the parameters in a non-interactive way?

technicalpickles commented 9 years ago

Not at this time :sweat: It's definitely a regression from the old generator, so would love to see it added back.

There's some discussion in https://github.com/github/hubot/issues/822 as well.

technicalpickles commented 9 years ago

I'm considering what the usage for a scriptable yo hubot would be. Some prior art from other commands and tools:

technicalpickles commented 9 years ago

Digging a bit more into yeoman, there doesn't seem to be a way to do an explicitly 'non-interactive' mode, ie never prompt.

But, there is support for arguments (see 'arguments' section of http://yeoman.io/authoring/user-interactions.html). There's not a builtin way to say use an argument, or prompt otherwise, though, but we can write it ourselves.

Probably can add another option like I suggested to signify it's non-interactive, and fail if an argument is missing, or maybe another option to accept defaults.

technicalpickles commented 9 years ago

This was implemented over in https://github.com/github/generator-hubot/pull/14 :sparkles: