fix: scriptName + improving usage messages (#305)

* Improving usage messages + fixing scriptName

* Fixes post-review
This commit is contained in:
Lucas Cimon 2021-11-29 23:51:02 +01:00 committed by GitHub
parent f1a336d9f3
commit d3b8f8889d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 13 deletions

View file

@ -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
@ -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

View file

@ -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)