If you have a flag that takes an array, how to make it differentiate between the values that it's supposed take and those that should just be positional arguments?
For Eg.:
create-index --filetype .js .jsx ./src
Here filetype should only take .js .jsx and ./src should be a positional argument.
It seems this isn't currently possible, right? I haven't come across this kind of use case before so I'm not sure what should the solution to this be. Is this something that should even be solved at yargs level, or should the end-user just be advised to use the cli in a way to avoid this issue altogether (create-index ./src --filetype .js .jsx)
If you have a flag that takes an array, how to make it differentiate between the values that it's supposed take and those that should just be positional arguments?
For Eg.:
Here
filetype
should only take.js .jsx
and./src
should be a positional argument.It seems this isn't currently possible, right? I haven't come across this kind of use case before so I'm not sure what should the solution to this be. Is this something that should even be solved at yargs level, or should the end-user just be advised to use the cli in a way to avoid this issue altogether (
create-index ./src --filetype .js .jsx
)