Open lacostej opened 6 years ago
@niezbop WDYT of something like that?
To test it
cd plugin-experiment
bundle exec ruby test.rb
I kept the dependency on commander, which we may not want to keep (there are alternatives to CLI library like gli
or thor
which may be more popular than commander
). (See https://gist.github.com/jasonroelofs/8117568)
I haven't tried to implement recursive commands. E.g. to be able to do something like
u3d command subcommand
that would map to its own subcommand.
I would like to add a few new features, like
I wonder if we should reorganize the core with a plugin mechanism. It would be cleaner than the current commands_generator concept.
Edit: a WIP prototype heavily inspired by Fastlane's plugin mechanism:
https://github.com/lacostej/u3d/tree/plugins/plugin-experiment