-
Notifications
You must be signed in to change notification settings - Fork 101
Description
Summary
Our project uses Nuxt and also Nuxt UI. We need to add a variety of Nuxt UI parts to our templates and things like Authorization from Nuxt Authorization. We use the npx nuxt add often to make our components, pages and apis and it would be super helpful for us to create our own templates in our project so we can automate much of our daily boilerplate.
This is a feature pattern that I'm familiar with from CakePHP, https://book.cakephp.org/bake/3/en/development.html#creating-a-bake-theme
Proposal
I don't think it needs to be complex, perhaps it follows the Nuxt folder organisation and there is a stubs folder in / of the project, and the code can simply look for that folder and if it exists, it tries to load the template from there, or falls back to the current functionality.
Code
https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/add.ts#L74-L75
Perhaps a resolver is needed to encapsulate the functionality, but a smell change here might work?