Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We can replace inquirer with prompts #6081

Open
saideepesh000 opened this issue Nov 23, 2020 · 4 comments
Open

We can replace inquirer with prompts #6081

saideepesh000 opened this issue Nov 23, 2020 · 4 comments

Comments

@saideepesh000
Copy link

Version

4.5.9

Reproduction link

facebook/create-react-app#10083

Environment info

.

Steps to reproduce

.

What is expected?

This may increase the speed and decrease the size of cli.

What is actually happening?

Actually, inquirer is larger in size than prompts.


Context: recently create-react-app replaced inquirer with prompts which reduced sized by 80%, we can do that to vue-cli too.
facebook/create-react-app#10083

@saideepesh000
Copy link
Author

I can help you with this.

@haoqunjiang
Copy link
Member

Thanks for raising this issue. But I'm wondering how much difference is there between the prompts object structure of prompts and that of inquirer.js? The prompts object is used in third-party Vue CLI plugins as well as in the core plugins.
So if we have to switch the implementation, we needed a detailed guide for plugin authors to migrate too.

@saideepesh000
Copy link
Author

Hey @sodatea, Thanks for replying to me, Actually I was just curious to know about this migration(like haven't you thought about using prompts instead of the inquirer), and if so, I thought I would help in this process. And could you give more details on how to prepare a guide for such things?

@haoqunjiang
Copy link
Member

Hi @saideepesh000, sorry for forgetting to reply earlier.
The guide should at least include mappings from the inquirer.js question objects to the prompts objects. And the example in the development guide needs to be updated too: https://cli.vuejs.org/dev-guide/plugin-dev.html#prompts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants