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

feat: setup wizard #448

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

feat: setup wizard #448

wants to merge 10 commits into from

Conversation

Lehoczky
Copy link

@Lehoczky Lehoczky commented Jul 5, 2024

🔗 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:

  • the user can chose to use prettier for formatting
  • eslint for linting
  • playwright for e2e testing
  • vitest for unit testing
  • recommended vscode settings

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.

@Lehoczky
Copy link
Author

Lehoczky commented Aug 22, 2024

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!

@pi0
Copy link
Member

pi0 commented Aug 23, 2024

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 🙏🏼

@pi0 pi0 marked this pull request as draft August 23, 2024 12:10
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

Successfully merging this pull request may close these issues.

Proposal: init test setup with Nuxi CLI Wizard
2 participants