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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: scriptName + improving usage messages #305

Merged
merged 2 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions other/MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ as you want/need to. Nobody can ask any more of you than that.
As a maintainer, you're fine to make your branches on the main repo or on your own fork. Either
way is fine.

When we receive a pull request, a travis build is kicked off automatically (see the `.travis.yml`
for what runs in the travis build). We avoid merging anything that breaks the travis build.
When we receive a pull request, a Circle CI build is kicked off automatically (see the `.circleci/`
directory for what runs in the CI pipeline). We avoid merging anything that breaks the CI pipeline.

Please review PRs and focus on the code rather than the individual. You never know when this is
someone's first ever PR and we want their experience to be as positive as possible, so be
Expand All @@ -56,8 +56,8 @@ about that.

## Release

Our releases are automatic. They happen whenever code lands into `master`. A travis build gets
kicked off and if it's successful, a tool called
Our releases are automatic. They happen whenever code lands into `master`. A Circle CI build
build gets kicked off and if it's successful, a tool called
[`semantic-release`](https://github.com/semantic-release/semantic-release) is used to
automatically publish a new release to npm as well as a changelog to GitHub. It is only able to
determine the version and whether a release is necessary by the git commit messages. With this
Expand Down
14 changes: 5 additions & 9 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,18 @@ const cwd = process.cwd()
const defaultRCFile = path.join(cwd, '.all-contributorsrc')

const yargv = yargs
.scriptName('all-contributors')
.help('help')
.alias('h', 'help')
.alias('v', 'version')
.version()
.recommendCommands()
.command('generate', 'Generate the list of contributors')
.usage('Usage: $0 generate')
.command('add', 'add a new contributor')
.usage('Usage: $0 add <username> <contribution>')
.command('init', 'Prepare the project to be used with this tool')
.usage('Usage: $0 init')
.command('generate', `Generate the list of contributors\n\nUSAGE: all-contributors generate`)
.command('add', `Add a new contributor\n\nUSAGE: all-contributors add <username> <comma-separated contributions>`)
.command('init', `Prepare the project to be used with this tool\n\nUSAGE: all-contributors init`)
.command(
'check',
'Compares contributors from the repository with the ones credited in .all-contributorsrc',
)
.usage('Usage: $0 check')
`Compare contributors from the repository with the ones credited in .all-contributorsrc'\n\nUSAGE: all-contributors check`)
.boolean('commit')
.default('files', ['README.md'])
.default('contributorsPerLine', 7)
Expand Down