-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor CLI code to get babel-ified and generally be more maintainab…
…le (#114) * Begin initial CLI refactor Refs #108 The general approach here is that each command should be simple to write with an easy means of operating against a provided UI and device. That way we can test against mocks/fakes and also easily swap out a different "UI" implementation. I don't plan to add a GUI, but this would make it easier to support `--json` mode, or even possibly a headless stdin-based daemon mode. I've decided against oclif because it just seems like too much, but commander.js or yargs seem like good options. * Restore some logging * Improve cli test correctness; support inline PIN prompts Closes #113 * Implement command routing using our old friend minimist Refs #108 Yargs has some great stuff but I don't like how it renders the options info. Commander.js seems very close, but it doesn't wrap descriptions at all. docopt and neodoc seem neat but don't let us nicely and succinctly describe what each command does. Minimist is simple and easy, and doesn't introduce any new dependency overhead, so let's just stick with it! * Remove old bin script and udpate package.json * Update readme with latest, cleaned up help text Closes #108
- Loading branch information
Showing
23 changed files
with
1,825 additions
and
1,549 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.