Closed gil0mendes closed 6 years ago
@gil0mendes Hi 👋
To help get this started, I created a new version of the bin files in my own fork/branch, which you can view here: https://github.com/nexdrew/stellar/tree/sywac/bin
You are free to use this work as you see fit. I think this will allow you to easily compare both versions (stellar
using yargs and stellarnew
using sywac) and run them side-by-side if necessary. As far as I can tell, the behavior of the new sywac version should be equivalent to the old yargs version, with the following exceptions:
completion
command was removed (sywac does not currently support bash completion)Note that there was minimal refactoring of commands (almost all execution logic was untouched), but sywac understands asynchronous commands (a run
method can return a Promise
), so you might be able to do things with sywac that you can't do with yargs with a little refactoring (like easily time the execution of commands or do some cleanup in a centralized way).
Let me know what you think. If you'd like, I can pretty easily update my branch to be suitable for a PR.
Hi 👋 @nexdrew,
Thanks again for the time spend, you are amazing, man. 👌 On the next weekend, I'll look into the code and run it and yes, would be really nice receiving a PR with those changes.
Thanks again 🙂
We are currently using
yargonaut
to apply style modifications toyarg
, but yarg as architectural limitations that limityargonaut
.Due to those limitations and some problems that we are having with the latest version of yarg and for the bad use of semantic version, that are constantly introducing breaking changes even in minor releases, we'll replace it by another package. The substitute will be Sywac, Sywac is a modern and powerful framework to build powerful CLI apps.
@nexdrew, the creator of yargonaut and Sywac, gave us an awesome response with a complex example of nested commands, one of our most common use cases. He also offered help on the rewrite of the CLI, and that would be very welcome, thanks for that 🙂