Munter / subfont

Command line tool to optimize your webfont loading. Aggressive subsetting based on your font use, self-hosting of Google fonts and preloading
MIT License
1.56k stars 29 forks source link

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

Closed papandreou closed 4 years ago

papandreou commented 4 years ago

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: https://github.com/yargs/yargs/issues/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 :zany_face:

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

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 557


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

💛 - Coveralls
papandreou commented 4 years ago

I'll just merge this and get it released.

papandreou commented 4 years ago

Released in 5.2.1.