Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to: CT-101 (design system) and CT-102 (removing bloat)
This is a POC of using
@clack/prompts
instead ofinquirer
for our prompting package.Reasons we'd like to do this:
inquirer-autocomplete-prompt
) brings in rxjs which is a huge sub dependency, and we'd like to remove it. (Ends up being around 17MB on filesystem)Description of clack
Clack has two packages -
@clack/core
and@clack/prompts
.@clack/core
is a group of plain, unstyled prompts. When instantiating a new prompt, you pass arender
callback in, and it is updated along with the state when it changes. You can see an example of using@clack/core
insrc/commands/clack/clack-core.mjs
or by running `./bin/run.mjs clack:core.Prompts is just a pre-styled use of
@clack/core
with (imo) a pleasant to use interface, and could save us a lot of design and dev time. It also contains some non-prompt utilities such as logging methods to match with the prompts. You can see an example of using@clack/prompts
insrc/commands/clack/clack-prompts.mjs
, or by running./bin/run.mjs clack:prompts
Screenshots / Gifs
I've converted one command
netlify sites:create-template
over to@clack/prompts
frominquirer
@clack/prompts
(after)