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

Support subfont --formats foo,bar and fix weirdness with --formats consuming further non-option arguments #126

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

papandreou
Copy link
Collaborator

I was kinda surprised that subfont --format woff,woff2 didn't work. Turns out yargs doesn't support that even though the option is declared as array: yargs/yargs#846

Also, the array type is weird, so I found that subfont --formats woff2 path/to/page.html fails because yargs tries to consume path/to/page.html as another format 🤪

This PR fixes both issues by switching to string and coercing the result into an array.

@papandreou papandreou self-assigned this Aug 8, 2020
@papandreou papandreou requested a review from Munter August 8, 2020 13:05
@papandreou papandreou changed the title Support subfont --formats foo,bar Support subfont --formats foo,bar and fix weirdness with --formats consuming further non-option arguments Aug 8, 2020
@coveralls
Copy link

coveralls commented Aug 8, 2020

Pull Request Test Coverage Report for Build 557

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 90.212%

Totals Coverage Status
Change from base Build 550: 0.02%
Covered Lines: 1148
Relevant Lines: 1222

💛 - Coveralls

@papandreou
Copy link
Collaborator Author

I'll just merge this and get it released.

@papandreou papandreou merged commit 48bad16 into master Sep 1, 2020
@papandreou papandreou deleted the feature/comma-separated-formats branch September 1, 2020 20:45
@papandreou
Copy link
Collaborator Author

Released in 5.2.1.

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