Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

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

Merged
pi0 merged 31 commits into
nuxt:mainfrom
Diizzayy:feat/cli-mode-flags
Aug 23, 2022
Merged

feat(nuxi): support mode flags for add command#3921
pi0 merged 31 commits into
nuxt:mainfrom
Diizzayy:feat/cli-mode-flags

Conversation

@Diizzayy

Copy link
Copy Markdown
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

netlifyBot commented Mar 27, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commitf25a094
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/63053a990965c80009f30b49

Comment threadpackages/nuxi/src/commands/add.ts Outdated
Comment threadpackages/nuxi/src/utils/templates.ts Outdated
Comment threadpackages/nuxi/src/utils/templates.ts Outdated
Comment threadpackages/nuxi/src/utils/templates.ts Outdated
Comment threadpackages/nuxi/src/commands/add.ts Outdated
Comment threaddocs/content/3.docs/1.usage/8.cli.md Outdated
Comment threadpackages/nuxi/src/commands/add.ts Outdated
Comment threaddocs/content/3.docs/1.usage/8.cli.md Outdated
@Diizzayy
Diizzayy requested a review from pi0March 29, 2022 10:21
@pi0pi0 added enhancement New feature or request cli labels Apr 5, 2022
pi0
pi0 approved these changes Aug 23, 2022

@pi0pi0 left a comment

Copy link
Copy Markdown
Member

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:mainAug 23, 2022
@pi0pi0 mentioned this pull request Aug 26, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xclienhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Diizzayy@atinux@pi0@danielroe