-
Notifications
You must be signed in to change notification settings - Fork 65
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
feat: setup wizard #448
base: main
Are you sure you want to change the base?
feat: setup wizard #448
Conversation
I reeeeally don't like pinging maintainers, and I know Pi is very busy with other projects, so I definitely won't ping him here, but @atinux I saw you commenting on other issues, maybe you or someone else from the team could look at this PR? Just asking because I see sometimes people asking questions about setting up linting, or testing, and this PR could help them a lot I think. It would also close one of the most liked ticket in the repository. If somethings needs to be changed, I'm happy to do it! |
Thanks for your nice works here dear @Lehoczky i am a fan of nunjucks and we used a similar templating system for nuxt<3. For moving forward with a proper wizard system, we need to support it at unjs/giget layer and i made some (very early) attempts to add peer utils (unjs/codeup). Please don't hesitate to ping me in discord if interested to collaborate on this. ❤️ /cc @danielroe marking this PR as draft for clarity but I'm on it and if for any reason you were thinking we need to speedup progress on this please ping me 🙏🏼 |
🔗 Linked issue
Resolves #53
Resolves #374
📚 Description
This PR implements an initial setup wizard which can be extended later.
Before implementing this feature I looked at some other framework CLI's:
When it comes to rendering the templates, I chose to follow the Angular CLI, and use template files. For templating engine, nunjucks was chosen, because it is mature and have a nice template syntax, but at the end, it was a personal choice. I'm open to changing it to something else if there is a reason to do that.
For the options I followed create-svelte and ask opinionated questions. For example, the CLI does not present choices for E2E frameworks (cypress / playwright), instead asks whether the user wants to use Playwright for E2E testing.
The benefit of this approach is that it mitigates decision fatigue and makes the CLI more maintainable (fewer choices, less code). It also helps newcomers by choosing tools for them.
Features:
Choosing playwright with eslint configures the eslint playwright plugin.
Choosing vitest with eslint configures the eslint vitest plugin.
Choosing vitest also sets up @nuxt/test-utils according to the Nuxt documentation.
Later I can add back the "UI Framework" choice which was present in Nuxt2 to allow automatically setting up some of the more popular UI libraries, like tailwindcss, unocss, primevue, vuetify.