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

fix(cmd_help): make help support docgen argument #173

Merged
merged 2 commits into from Jan 30, 2024
Merged

Conversation

ee7
Copy link
Contributor

@ee7 ee7 commented Jan 29, 2024

Issue

#170

Description

Before this PR, chalk help docgen didn't behave as I'd expect:

$ chalk help docgen
 Searching Documentation For Term: Docgen
 No Matches Found In Command-Line Flag Documentation
 No Matches In Configuration Variables
 No Matches In Found Metadata Key Docs
 No Matches In Other Documents.

Make it work, producing the same output as chalk docgen --help:

$ chalk help docgen
 docgen command
 Generate technical documentation

 ┌┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┬┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┐
 ┊ Aliases                              ┊ None                ┊
 ┊ Arguments                            ┊ None                ┊
 └┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┴┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┘

 Description
Internal function to generate technical documentation in
markdown format.

Fixes: #170

Testing

Run chalk help docgen.

Before this commit, `chalk help docgen` didn't work:

    $ chalk help docgen
     Searching Documentation For Term: Docgen
     No Matches Found In Command-Line Flag Documentation
     No Matches In Configuration Variables
     No Matches In Found Metadata Key Docs
     No Matches In Other Documents.

Make it work, producing the same output as `chalk docgen --help`.

    $ chalk help docgen
     docgen command
     Generate technical documentation

     ┌┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┬┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┐
     ┊ Aliases                              ┊ None                ┊
     ┊ Arguments                            ┊ None                ┊
     └┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┴┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┘

     Description
    Internal function to generate technical documentation in
    markdown format.

Closes: #170
@ee7 ee7 requested a review from viega as a code owner January 29, 2024 14:34
Copy link
Contributor

@miki725 miki725 left a comment

Choose a reason for hiding this comment

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

LGTM although docgen was sort of internal command so not sure if @viega omitted it from help system on purpose

@ee7
Copy link
Contributor Author

ee7 commented Jan 30, 2024

docgen is currently listed in chalk help commands, so I think chalk help docgen should work given that chalk docgen --help works.

As a follow-up, we could consider not exposing chalk docgen in user-facing help messages if we think that regular chalk users don't need to know about it. There might be some complexity there if we want to mark docgen in the spec as an internal command.

I think this PR is at least an improvement on the status quo, so I'll merge it. If we want docgen to be more hidden, please open an issue for that. We could also consider e.g. changing the description from "Generate technical documentation" to something like "Internal command to generate chalk documentation".

@ee7 ee7 merged commit ae84275 into main Jan 30, 2024
2 checks passed
@ee7 ee7 deleted the ee7/fix-help-docgen branch January 30, 2024 15:49
@ee7 ee7 changed the title fix(cmd_help): make help support docgen command fix(cmd_help): make help support docgen argument Jan 30, 2024
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.

chalk help docgen doesn't output help, unlike chalk docgen --help
2 participants