]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commit
feat!: use a giant multiselect instead of individual toggles for features (#695)
authorHaoqun Jiang <haoqunjiang@gmail.com>
Fri, 7 Mar 2025 05:56:50 +0000 (13:56 +0800)
committerGitHub <noreply@github.com>
Fri, 7 Mar 2025 05:56:50 +0000 (13:56 +0800)
commit3aaddc6b4ef40fe1291cc5ce2d16c7bdbb5a6b1f
tree83685ce8f9adcd67dcb4992475a09af7e884e32d
parent12a7b40ac2020d636fa41be1e4e1af62ccaf6b5f
feat!: use a giant multiselect instead of individual toggles for features (#695)

As we are adding more features, the number of toggles is getting out of hand. A multiselect could save a few keystrokes for most users.

I also take this opportunity to change the prompts library to `@clack/prompts`.
(For context: `create-astro`, `sv`, `create-preact`, `create-solid`, `create-qwik` all use `@clack/prompts`, `create-vite` recently switched to `@clack/prompts` too, while `create-next-app` uses `prompts`)

The color library is changed to `picocolors`. IMO `kleur` is still the smaller library because of treeshaking. But `@clack/prompts` already comes with `picocolors` as a dependency, so by not adding `kleur`, we save a few bytes.

---

This is a proof-of-concept PR. I haven't put much consideration into the code style yet. Nor have I updated the i18n messages. I will do that if this change is accepted.

See the result in a screen recording:
[![asciicast](https://asciinema.org/a/Aq334bHe0tJBpuxLNQyVAyzXb.svg)](https://asciinema.org/a/Aq334bHe0tJBpuxLNQyVAyzXb)
---

TODOs:
- [x] Clean up the code (wrap the `isCancel` condition; update the `needsEslint` type, etc.)
- [ ] I think we should remove the `packageName` related logic but it can be postponed into another PR
- [ ] Get the message translations reviewed

* chore: small formatting improvements to the intro/outro message [skip ci]

Still much work to do. But it's acceptable for now.

* chore: unselect -> deselect

* refactor: update English prompts

* docs: update all the locales with the new prompts

* refactor: remove some duplicated or redundant code

* refactor: further cleanup of codebase

* build: remove alias for `prompts` package

* docs: Update fr-FR.json [skip ci]

* i18n: add translations for the "should not be empty" message
LICENSE
index.ts
locales/en-US.json
locales/fr-FR.json
locales/tr-TR.json
locales/zh-Hans.json
locales/zh-Hant.json
package.json
pnpm-lock.yaml
scripts/build.mjs
utils/getLanguage.ts