spectacle icon indicating copy to clipboard operation
spectacle copied to clipboard

`create-spectacle` prompts

Open gksander opened this issue 2 years ago • 0 comments

create-spectacle prompts

This PR adds prompts to the create-spectacle package, so that users do not need to remember flags (although flags are still available). Some things to note:

  • If you pass all possible flags, and you're not trying to overwrite a folder, we bypass prompts.
  • All four prompts (name, type, lang, port) are shown – but have default values based on args/flags.
  • I tried damn hard to test this, but woah. What a challenge. Writing tests around dynamic stdout/stdin with these interactive prompts was tough and flakey and I just couldn't pull it off in the time I allotted for it. Something I wouldn't mind looping back to, but decided to cut my losses for the week.

Prompt flow

cs-prompt1

All flags, no prompts

cs-prompt2

gksander avatar Aug 11 '22 17:08 gksander