I have been putting this off long enough - and heard enough feedback from people that I’m ready to relent on some particular ideas I had around CLI parsing.
In particular, let’s move to the model the flags after the script are passed to Deno.args. Let’s allow for parameters to arguments so we can support evaluating oneliners (-e) and import maps. And we should consider making “deno —fmt” into “deno fmt”
Ideally there’s a rust crate which we can offload this onto? Anyone have proposals for such a crate? Anyone want to take this task on?
What about Clap ? Seems to fit our need. It has some cool features like:
And as far as the example shows, looks not really intrusive. Maybe check the weight of the Deno binary importing it?
@zekth seems very feature complete and would definitely work. I wonder if there are other more minimal options.
@piscisaureus thoughts?
@piscisaureus and I have reviewed clap and approve of it. Are there any volunteers for taking a first pass at using clap in //cli/flags.rs ?
I can tackle it over the weekend
@bartlomieju Cool - thanks - you're well positioned to tackle this. I'll get third_party setup for you today.
If backup needed, feel free to hit me.
Most helpful comment
I can tackle it over the weekend