Closed lorinbeer closed 9 years ago
Morning @lorinbeer!
There's a lot to cover in this pull request, so I think we should break it down to three levels:
Purpose: What does the CLI solve?
What is the purpose of adding a CLI interface to this module?
Originally, a year and a half ago, this module included a CLI interface. However, after development, I chose to move the CLI implementation to the PhoneGap CLI module.
Today, this module offers a node-interface to interact with PhoneGap Build. It's used by the PhoneGap CLI, PhoneGap Build QA, and a few third-party projects. None of these projects have requested a CLI interface for this module.
I'm very hesistent to offer yet-another-CLI to the already polluted and confusing ecosystem of Apache Cordova, PhoneGap, and friends. For users, it's confusing to know what needs to be installed and difficult to keep the various projects up-to-date. The plugman
project is a great example of this struggle.
So, I think it makes sense to first answer: what value does the CLI interface offer?
So, I think it makes sense to first answer: what value does the CLI interface offer?
- proper 'sources of truth' management a simple principle of good software architecture is to only manage a single source of truth. We can manage the CLI expectations of phonegap build in the same place, not across repositories.
- factor out unneeded code the extant cli code (in pg-cli) had a tremendous amount of duplication. This has been slimmed down and inserted into the node-phonegap-build repo. The code to manage remote commands was so verbose in pg-cli that I thought the remote functionality was implemented there, not here.
- phonegap cli support since the pg-cli already shells out for all its core functionality (to cordova cli), the exact same code can be used to shell out to any sub-cli. This makes handling local and remote functions simple and stable, and further trims down on the amount of code we have to manage in the future.
ping @mwbrooks
due to an apparent lack of interest, closing.
Basic CLI functionality
supports $ pgbuild login $ pgbuild logout $ pgbuild build
in support of Cordova 4.0.0, this branch includes the functionality for creating a .pgbuild directory to replace the deprecated .cordova directory. This stores local pgbuild data.
I would like to keep the code review focused on the architecture and functionality of the branch and not issues of style, naming or anything that can be trivially altered.