Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(add): show description for template positional arg #325

Merged

Conversation

shinGangan
Copy link
Contributor

@shinGangan shinGangan commented Jan 10, 2024

πŸ”— Linked issue

resolved #317 .

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 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)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

When I ran the nuxi add β€”help command, the description of the type: positional option was not displayed, as shown below.

Create a new template file. (nuxi add v3.10.0)                                

USAGE nuxi add [OPTIONS] <TEMPLATE> <NAME>

ARGUMENTS

  TEMPLATE    
      NAME    

OPTIONS

       --cwd    Current working directory
  --logLevel    Log level                
     --force    Override existing file

So we displayed the explanation as follows.

Create a new template file. (nuxi add v3.10.0)                                                                                                                                                 

USAGE nuxi add [OPTIONS] <TEMPLATE> <NAME>

ARGUMENTS

  TEMPLATE    Scaffold template. 
              Possible values: api, plugin, component, composable, middleware, layout, page
      NAME    Generated file name                                                                                            

OPTIONS

       --cwd    Current working directory
  --logLevel    Log level                
     --force    Override existing file

Contents not supported by this PR

  • Addition of explanation for mode options such as β€”client, β€”server.
  • Addition of explanation for β€”method option.

For user convenience, --client, --server, --global, and --method would like to displayed. However, it requires a slight modification of the existing implementation and should be discussed in a separate issue.
(It would be easier to add options for each Template if it were a subcommand, but it would increase maintenance costs.)

Note

This PR is not urgent.
Therefore, you can lower the priority of the review (if you have another reviewer, we would appreciate it if you could assign it to them, also low priority is not a problem).

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

@shinGangan
Copy link
Contributor Author

shinGangan commented Jan 10, 2024

Hi, @pi0 (I wasn't sure who to request a review from).

We would appreciate your review and approve the workflows when you have time.

Note

This PR is not urgent.
Therefore, you may lower the priority of your review

Thank you for your ❀️ action.

@shinGangan shinGangan changed the title refactor(cli): show description of add command (#317) refactor(add): show description of add command (#317) Jan 10, 2024
@shinGangan shinGangan changed the title refactor(add): show description of add command (#317) refactor(add): show description of add command (#325) Jan 15, 2024
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 (updated with citty fix that shows valueHint for positional as well. nice spot!)

@pi0 pi0 changed the title refactor(add): show description of add command (#325) refactor(add): show description for template positional arg Feb 14, 2024
@pi0 pi0 merged commit 8ba7e5d into nuxt:main Feb 14, 2024
2 checks passed
@shinGangan
Copy link
Contributor Author

Thank you for merging this PR. πŸ™

@shinGangan shinGangan deleted the refactor/317-show-description-of-add-command branch February 14, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Help regarding add command
2 participants