framework
framework copied to clipboard
feat(nuxi): support mode flags for `add` command
- [ ] 📖 Documentation (updates to the documentation or readme)
- [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
- [x] 👌 Enhancement (improving an existing functionality like performance)
- [ ] ✨ New feature (a non-breaking change that adds functionality)
- [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
📚 Description
Allow --client|--server flags to be used with nuxi add to specify that the respective entity should be either client / server only.
This PR also handles the case where a user manually specifies a file extension when using nuxi add, With current implementation nuxi add plugin test.ts would result in /plugins/test.ts.ts being generated.
Side note: Nuxt 3 encourages typescript usage for optimal developer experience, hence though different entities allow for varying extensions, nuxi add defaults to (and enforces) .vue and .ts.
📝 Checklist
- [ ] I have linked an issue or discussion.
- [x] I have updated the documentation accordingly.
Deploy Preview for nuxt3-docs canceled.
| Name | Link |
|---|---|
| Latest commit | f25a09450a680bbd6b1c1f1cd6f2a7e887f8d22b |
| Latest deploy log | https://app.netlify.com/sites/nuxt3-docs/deploys/63053a990965c80009f30b49 |