Conversation
|
Very cool that my library was helpful! I don't have time to look too deeply into the code, but my initial thought is that we probably want a different name than I am certain you are aware, but argparse is the standard CLI parser for python and is massively popular. It has been re-implemented in a variety of languages, some of which re-use the name. I think that we should only opt to use that name if we are explicitly re-implementing After a quick glance it does not seem that this implementation is trying to match |
|
Yeah, that's a valid point, Frank! Maybe something like |
| } | ||
|
|
||
| type ParseInterface = typeof(cliargs) | ||
| export type ParserType = setmetatable<ParseData, ParseInterface> |
There was a problem hiding this comment.
| export type ParserType = setmetatable<ParseData, ParseInterface> | |
| export type Parser = setmetatable<ParseData, ParseInterface> |
The one that is actually exposed should have an "ordinary" type name, don't need to overcomplicate it.
|
I'd just name it |
aatxe
left a comment
There was a problem hiding this comment.
I'll do the file rename and type rename myself after it's merged in, I guess.
Derived from [frkcli](https://github.com/itsfrank/frkcli), cc @itsfrank Closes luau-lang#83 This provides a lightweight, flexible CLI argument parser for Luau. It allows handling positional arguments, options, and flags, making it easier to build scripts that are dependent on the CLI. --------- Co-authored-by: unfetchable <mitu@vite.global> Co-authored-by: ariel <aweiss@hey.com>
Derived from frkcli, cc @itsfrank
Closes #83
This provides a lightweight, flexible CLI argument parser for Luau. It allows handling positional arguments, options, and flags, making it easier to build scripts that are dependent on the CLI.