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
feat: add --aliases
flag for readme command
#925
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shazron thanks for the contribution - this is a great idea!
src/commands/readme.ts
Outdated
} | ||
|
||
static aliases = ['rdm'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to not put an alias on this command unless there's overwhelming demand for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me neither, but I will have to figure out another way to test this then...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shazron You can emulate the tests that use the fixtures
. For example,
oclif/test/unit/readme.test.ts
Line 63 in da5a4d2
describe('with custom help that does not implement formatCommand', () => { |
Basically, you just need to add a CLI with an alias'd command to the fixtures
directory and use that for your test case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha, I'll amend the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdonnalley I've resolved it to use a custom fixture. However the tests are failing due to AWS_ACCESS_KEY_ID
not being set. I assumed the CI would set this in its environment, but it's failing there as well. Those tests are not relevant to this PR and I never touched them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #951
This is to allow for
--no-aliases
so the README being generated for a plugin does not include aliases, which may clutter the documentation.Example usage in
package.json
: