Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

feat(nuxi): support mode flags for add command #3921

Merged
merged 31 commits into from
Aug 23, 2022

Conversation

Diizzayy
Copy link
Member

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ 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.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Mar 27, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit f25a094
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/63053a990965c80009f30b49

packages/nuxi/src/commands/add.ts Outdated Show resolved Hide resolved
packages/nuxi/src/utils/templates.ts Outdated Show resolved Hide resolved
packages/nuxi/src/utils/templates.ts Outdated Show resolved Hide resolved
packages/nuxi/src/utils/templates.ts Outdated Show resolved Hide resolved
packages/nuxi/src/commands/add.ts Outdated Show resolved Hide resolved
docs/content/3.docs/1.usage/8.cli.md Outdated Show resolved Hide resolved
pi0 and others added 3 commits March 29, 2022 11:06
@Diizzayy Diizzayy requested a review from pi0 March 29, 2022 10:21
@pi0 pi0 added enhancement New feature or request cli labels Apr 5, 2022
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've made a small refactor that enables modifiers for components, API, etc per template.

@pi0 pi0 merged commit 5ef1356 into nuxt:main Aug 23, 2022
@pi0 pi0 mentioned this pull request Aug 26, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x cli enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants