Closed dokterbob closed 11 years ago
Hey @dokterbob,
I like where you're going with this, but as you mentioned it's a non-trivial change that's starting to challenge some of the CLI design decisions.
There is a bit more to the story that I'd like to fill you in on. After understanding where the project is going, I hope it will help you understand (and help improve) the project!
I have two command-line interfaces in progress: phonegap-build-cli
and phonegap-cli
.
phonegap-build-cli
The PhoneGap/Build CLI is a command-line tool and node library that has the goal of allowing developers to completely interact with PhoneGap/Build.
phonegap-cli
The PhoneGap CLI will be the main command-line tool for PhoneGap. It will allow a developer to create a project and build the project locally or remotely. In other words, if the platform SDK exists, it will build locally otherwise fallback on PhoneGap/Build.
Internally, the PhoneGap CLI should do very little. For local building, it will use the cordova-cli
to build locally. For remote building, it will use the phonegap-build-cli
. The hardest task of the PhoneGap CLI is ensuring that all commands has the same input and output, regardless of a local or remote action (creating, building, key management, etc).
The Road Ahead
Soon, I am planning to remove the command-line interface from phonegap-build-cli
and make it a node library. Developers will be able to use phonegap-cli
without sacrificing functionality.
I like the idea of adding / remove platforms and settings default platforms in order to make repetitive commands easier. You have the same thought as me - to store those platforms in the .cordova/config.json
.
I think this functionality should go into phonegap-cli
instead of phoneagp-build-cli
- especially if we are going to remove the CLI component.
So I'll kick up a few issues on phonegap-cli
and we can continue the discussion there!
I'm going to close this pull request. This project not longer offers a CLI (replaced by phonegap-cli
). Also, I've referenced this issue under mwbrooks/phonegap-cli#22.
Most of the time, all people want to do is build. Plus; it feels very counter-intuitive to execute
phonegap-build build
all the time. Moreover, most of the time we will want to build for the same platform.This pull request:
build
command if none is specified.android
when none is specified.This should pave the way for:
create
command and stored in.cordova/config.json
within the project.For now this code will be used by us internally. As a merge would imply certain non-trivial design decisions (i.e. defaulting to Android) and we are open to feedback on suggestions for improvements. Meanwhile, we think it's important to 'have the code out there' for other people to use. Hence the pull request. :)