phonegap / node-phonegap-build

PhoneGap Build node module to login, create, and build apps.
Apache License 2.0
25 stars 25 forks source link

Assume build command by default and default platform to Android #31

Closed dokterbob closed 11 years ago

dokterbob commented 11 years ago

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:

This should pave the way for:

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. :)

mwbrooks commented 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!

mwbrooks commented 11 years ago

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.