Open piranna opened 10 years ago
sounds like a good idea.
ndm install
calls interview
as well -- did you picture being able to send the interview's command line arguments to install
?
This is something I'd had on my mind as well, although I don't think we need to switch off of inquirer to get the functionality.
In my head, I was picturing that you could pass answers to prompt questions as part of the ndm invocation:
ndm interview --answer-banana=apple --answer-coolio=blarg
I also thought it would be good to be able to have an answers.json
on disk, which is a map providing answers to interview questions.
@seanewest I didn't think about ndm install
,but obviously they should be used there and any other place ndm interview
could be called indirectly ;-)
@bcoe I'm not saying to replace inquier with prompt, it's only I found that feature really useful. In fact, the example you've put is the same I was thinking about :-) Is the answers.json
a config file for ndm interview
? If so it would be also import from stdio by setting -
as input file :-)
@piranna one option is just piping in the answers:
ndm interview < answers.txt
If you have answers in the appropriate order, with \n
on each line, it should do the right thing. Do you think we should just document this and skip adding the json feature?
Piping a file is a good idea, it should be on the readme. But what happens if you have the answers for first and third questions, but you want to ask the second one? This is possible only by passing the answers as parameters or as a json mapping file.
:+1: good point, I like the idea of being able to pipe JSON.
Thank you ;-)
prompt allow to define command line parameters so it doesn't do that questions later, it would be a good feature for
ndm interview
so it doesn't block asking the configuration parameters.