Skip to content

Commit d3b8f88

Browse files
authored
fix: scriptName + improving usage messages (#305)
* Improving usage messages + fixing scriptName * Fixes post-review
1 parent f1a336d commit d3b8f88

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

other/MAINTAINING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ as you want/need to. Nobody can ask any more of you than that.
4141
As a maintainer, you're fine to make your branches on the main repo or on your own fork. Either
4242
way is fine.
4343

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

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

5757
## Release
5858

59-
Our releases are automatic. They happen whenever code lands into `master`. A travis build gets
60-
kicked off and if it's successful, a tool called
59+
Our releases are automatic. They happen whenever code lands into `master`. A Circle CI build
60+
build gets kicked off and if it's successful, a tool called
6161
[`semantic-release`](https://github.com/semantic-release/semantic-release) is used to
6262
automatically publish a new release to npm as well as a changelog to GitHub. It is only able to
6363
determine the version and whether a release is necessary by the git commit messages. With this

src/cli.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,18 @@ const cwd = process.cwd()
1616
const defaultRCFile = path.join(cwd, '.all-contributorsrc')
1717

1818
const yargv = yargs
19+
.scriptName('all-contributors')
1920
.help('help')
2021
.alias('h', 'help')
2122
.alias('v', 'version')
2223
.version()
2324
.recommendCommands()
24-
.command('generate', 'Generate the list of contributors')
25-
.usage('Usage: $0 generate')
26-
.command('add', 'add a new contributor')
27-
.usage('Usage: $0 add <username> <contribution>')
28-
.command('init', 'Prepare the project to be used with this tool')
29-
.usage('Usage: $0 init')
25+
.command('generate', `Generate the list of contributors\n\nUSAGE: all-contributors generate`)
26+
.command('add', `Add a new contributor\n\nUSAGE: all-contributors add <username> <comma-separated contributions>`)
27+
.command('init', `Prepare the project to be used with this tool\n\nUSAGE: all-contributors init`)
3028
.command(
3129
'check',
32-
'Compares contributors from the repository with the ones credited in .all-contributorsrc',
33-
)
34-
.usage('Usage: $0 check')
30+
`Compare contributors from the repository with the ones credited in .all-contributorsrc'\n\nUSAGE: all-contributors check`)
3531
.boolean('commit')
3632
.default('files', ['README.md'])
3733
.default('contributorsPerLine', 7)

0 commit comments

Comments
 (0)