Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔗 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.