Dynamic imports
I just stumbled across this example (https://github.com/pallets/click/tree/main/examples/complex/complex) provided by the awesome click project.
I have to admit I'm very intrigued by the implementation, it looks pretty neat to dynamically import the commands.
@SteinRobert What would be the main benefit of that approach? The command structure might be automatically mirrored by the module structure and you don't ave to manually add a new command?
Talking about imports, I think we shoud definitely get rid of that src in all the imports.
Talking about imports, I think we shoud definitely get rid of that src in all the imports.
This - 100%.
@SteinRobert What would be the main benefit of that approach? I was thinking maybe the CLI would become a bit more faster. However, I just did a test a few weeks ago and the performance gains have been around 50-100ms. So dynamic imports are probably a bit of a premature optimization, if ever needed.