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: add usage api #93

Merged
merged 3 commits into from
Dec 12, 2020
Merged

docs: add usage api #93

merged 3 commits into from
Dec 12, 2020

Conversation

yinm
Copy link
Contributor

@yinm yinm commented Nov 12, 2020

It seems there aren't references to cli.usage(text) and command.usage(text).
I think they exist in README.md is more useful, so I added.

cac/src/CAC.ts

Lines 60 to 68 in d2c6b8a

/**
* Add a global usage text.
*
* This is not used by sub-commands.
*/
usage(text: string) {
this.globalCommand.usage(text)
return this
}

cac/src/Command.ts

Lines 58 to 61 in d2c6b8a

usage(text: string) {
this.usageText = text
return this
}

@egoist
Copy link
Collaborator

egoist commented Dec 11, 2020

Can you commit the change locally or run yarn toc so that the Table of Contents gets updated?

@yinm
Copy link
Contributor Author

yinm commented Dec 12, 2020

@egoist
Thanks your reply.
I run yarn toc and committed b6d6e29 .

@egoist egoist merged commit 15e9f80 into cacjs:master Dec 12, 2020
@yinm yinm deleted the doc-usage branch December 12, 2020 10:45
@egoist
Copy link
Collaborator

egoist commented Feb 17, 2021

🎉 This PR is included in version 6.7.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants