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.
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 asarray
: https://github.com/yargs/yargs/issues/846Also, the
array
type is weird, so I found thatsubfont --formats woff2 path/to/page.html
fails because yargs tries to consumepath/to/page.html
as another format :zany_face:This PR fixes both issues by switching to
string
and coercing the result into an array.