You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like your library, but something I'd like over the file-structured based hierarchy is if I could define the architecture myself when creating an instance of CLI. This would also be a workaround for #41 as there's no need for a pre-compiled file.
I'd propose an overload for CLI or a new type like InMemoryCLI that accepts the following data structure as the second argument:
Hi, thanks for this suggestion. There is some performance concern over large command bundle, but I think there would be easy fixes like dynamic import.
Hey ho,
I like your library, but something I'd like over the file-structured based hierarchy is if I could define the architecture myself when creating an instance of
CLI
. This would also be a workaround for #41 as there's no need for a pre-compiled file.I'd propose an overload for
CLI
or a new type likeInMemoryCLI
that accepts the following data structure as the second argument:To give an example, here's your structure from the "subcommands" section in the README:
And with my proposed functionality:
Or alternatively, you could create an
index.ts
in ever sub-commands folder, e.g. forcommands/foo/index.ts
:And when importing:
The text was updated successfully, but these errors were encountered: