vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.75k stars 6.33k forks source link

We can replace inquirer with prompts #6081

Open saideepesh000 opened 3 years ago

saideepesh000 commented 3 years ago

Version

4.5.9

Reproduction link

https://github.com/facebook/create-react-app/pull/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. https://github.com/facebook/create-react-app/pull/10083

saideepesh000 commented 3 years ago

I can help you with this.

haoqunjiang commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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