Skip to content

Commit

Permalink
fix: scriptName + improving usage messages (#305)
Browse files Browse the repository at this point in the history
* Improving usage messages + fixing scriptName

* Fixes post-review
  • Loading branch information
Lucas-C committed Nov 29, 2021
1 parent f1a336d commit d3b8f88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
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

0 comments on commit d3b8f88

Please sign in to comment.