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

docs: auto-generate npm usage for each command #4450

Merged
merged 7 commits into from
Feb 24, 2022

Conversation

manekinekko
Copy link
Contributor

@manekinekko manekinekko commented Feb 21, 2022

Auto-generate npm usage for each command.

NOTE:
These files seem to lack usage description:

Edit:
We now generate default usage information for commands with no usage descriptions.

References

Closes #4189

@manekinekko manekinekko requested a review from a team as a code owner February 21, 2022 13:56
@wraithgar wraithgar changed the base branch from latest to release-next February 22, 2022 14:49
@wraithgar
Copy link
Member

The base command file has this snippet for when there is no usage

    if (!this.constructor.usage) {
      usage = `${usage}npm ${this.constructor.name}`
    } else {

@wraithgar
Copy link
Member

wraithgar commented Feb 22, 2022

This is great! I think if we fix the commands with no usage defined, and npx, this is good to go. I'll ask some other cli folks in case they have thoughts.

@wraithgar
Copy link
Member

This PR is reminding me we need to clean those html comments out of the man output so here's that PR #4457

@wraithgar
Copy link
Member

This is great. I think all we need now is one more special case for npx so that it says npx instead of npm exec and this is good to go!

lukekarrys
lukekarrys previously approved these changes Feb 23, 2022
@lukekarrys lukekarrys self-requested a review February 23, 2022 17:07
@lukekarrys lukekarrys dismissed their stale review February 23, 2022 18:54

My previous requested changes have been resolved, but I'm removing this review since there is still one more change requested.

@lukekarrys lukekarrys removed their request for review February 23, 2022 18:54
@manekinekko
Copy link
Contributor Author

Good catch. Fixing this asap!

@wraithgar
Copy link
Member

Oops, looks like it changed the npm exec usage to show npx and cleared out the usage on npx.md

Copy link
Member

@wraithgar wraithgar left a comment

Choose a reason for hiding this comment

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

I didn't even notice it at first but you ALSO fixed the config descriptions to use defaultDescription which they didn't appear to be doing before.

This is GREAT!!!

@lukekarrys lukekarrys merged commit 6b68c1a into npm:release-next Feb 24, 2022
@manekinekko
Copy link
Contributor Author

Thank y'all for your prompt responses 💖

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.

[DOCS] Synopsis sections are not auto generated.
3 participants