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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Derive name of positional arguments from property name #6

Merged
merged 7 commits into from
Aug 22, 2019
Merged

feat: Derive name of positional arguments from property name #6

merged 7 commits into from
Aug 22, 2019

Conversation

eps1lon
Copy link
Contributor

@eps1lon eps1lon commented Aug 21, 2019

Ref: yarnpkg/berry#371 (comment)

Nice-to-have?:

  • [ ] hyphenate names
  • [ ] make name configurable @Command.String({ name: 'workspace-name' }) or @Command.String('workspace-name'). Though the second variant requires more work since the library currently assumes that named arguments are optional.

sources/core.ts Outdated Show resolved Hide resolved
Copy link
Owner

@arcanis arcanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks real nice! Just one suggestion for the typing.

Regarding the display, hyphenating would probably be a good idea, but no need to make it configurable as it'll be purely aesthetic anyway, so I'd say the less configuration overhead the better in this case.

sources/core.ts Outdated Show resolved Hide resolved
tests/advanced.test.ts Outdated Show resolved Hide resolved
@eps1lon eps1lon marked this pull request as ready for review August 21, 2019 18:11
@eps1lon
Copy link
Contributor Author

eps1lon commented Aug 21, 2019

Not so sure about hyphenating anymore. I think this is good as-is.

sources/core.ts Outdated Show resolved Hide resolved
sources/core.ts Outdated Show resolved Hide resolved
@arcanis
Copy link
Owner

arcanis commented Aug 21, 2019

Sounds good, let's try like this 👍

Co-Authored-By: Maël Nison <nison.mael@gmail.com>
@arcanis
Copy link
Owner

arcanis commented Aug 22, 2019

image

Sweet 👌

@arcanis arcanis merged commit 34afb37 into arcanis:master Aug 22, 2019
@eps1lon eps1lon deleted the feat/name-positional-args branch August 22, 2019 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants