jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.26k stars 508 forks source link

RFC: Snippet Prompt for project bootstrapping #787

Open jaredpalmer opened 4 years ago

jaredpalmer commented 4 years ago

Current Behavior

TSDX assumes a lot about package.json. Maybe we want to let users do a bit more?

Desired Behavior

Get it package.json right the first time, but also bootstrap projects as fast as possible.

Suggested Solution

I found a the enquirer snippet prompt today. We could use it to fill in some missing parts of package.json like in the GIF below.

https://github.com/enquirer/enquirer#snippet-prompt

Prompts

Who does this impact? Who is this for?

Everyone.

Describe alternatives you've considered

Not doing it and keeping existing behavior.

...Discuss

agilgur5 commented 4 years ago

I'm not sure how:

  1. usable it is -- the inputs currently taken by create are used in more than just package.json. The snippet prompt does not seem to have that ability per the docs
  2. useful it is -- they can edit this themselves after create (or use one of the custom template proposals)

Everyone.

It's only for users of create, which is not everyone and only for new libraries. I don't use create myself