cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <...@adobe.com>
Subject Re: cordova-cli api
Date Wed, 05 Jun 2013 15:30:18 GMT
I have chalked up adding "run" which will directly translate into a call
to the platform scripts [1].

Mike, note that cordova-cli uses "compile" AND "build" - build does a
"prepare" before it compiles, whereas compile simply, well, compiles.

[1] https://issues.apache.org/jira/browse/CB-3612

On 6/5/13 6:07 AM, "John Wargo" <jwargo23@gmail.com> wrote:

>I agree - makes sense.
>
>On 6/4/2013 12:41 PM, Michael Brooks wrote:
>> I'm in favour of using "build," "run," and "install" because these
>>commands
>> match the platform-scripts. They are also arguably more descriptive of
>> their resulting action.
>>
>> Currently, the PhoneGap CLI also uses "build," "run," and "install"
>>instead
>> of "compile,", "emulate," and "deploy." [1]
>>
>> [1] https://github.com/mwbrooks/phonegap-cli#usage
>>
>>
>>
>>
>> On Tue, Jun 4, 2013 at 8:27 AM, Brian LeRoux <b@brian.io> wrote:
>>
>>> Think we need a run cmd too. Specifying target makes sense.
>>>
>>> On Tue, Jun 4, 2013 at 10:50 AM, Braden Shepherdson
>>><braden@chromium.org>
>>> wrote:
>>>> I'm okay with adding a run command and/or emulate command to CLI.
>>> `cordova
>>>> run android` or similar? Since we (will soon) have these
>>>>platform-level
>>>> scripts with uniform APIs, it shouldn't be hard to call them for each
>>>> platform.
>>>>
>>>> Braden
>>>>
>>>>
>>>> On Mon, Jun 3, 2013 at 8:50 PM, Filip Maj <fil@adobe.com> wrote:
>>>>
>>>>> The current command-line API has a few main "action" type commands:
>>>>>
>>>>> - compile (shells out to the "build" script)
>>>>> - prepare (copies over www assets into platform folders, prepares
>>>>>plugin
>>>>> files, that sort of thing)
>>>>> - emulate (deploys to an emulator)
>>>>> - build (alias for a prepare + a compile)
>>>>>
>>>>> ..and a few "setup" type commands:
>>>>>
>>>>> - platform add/rm whatever
>>>>> - plugin add/rm whatever
>>>>>
>>>>> My issue with this api is that it doesn't line up with the command
>>>>>line
>>>>> tooling design that we've agreed upon [1].
>>>>>
>>>>> Most of the time, users want to either get the app on a device, or
>>>>>on an
>>>>> emulator. We have a "run" platform-level script defined that does the
>>>>> run-on-device bits, and an "emulate" script that does the emulator
>>>>> launching + deploying to an emulator. The run command implicitly
>>>>>calls
>>> the
>>>>> platform-level "build" script to compile the app first.
>>>>>
>>>>> I would suggest in some manner exposing the "run" command. I'm open
>>>>>to
>>>>> suggestions on how to tweak the API. Ideally, I would like to slate
>>> these
>>>>> api changes for 3.0.
>>>>>
>>>>> Thoughts/comments/suggestions welcome!
>>>>>
>>>>> [1] http://wiki.apache.org/cordova/CommandLineToolingDesign
>>>>>
>>>>>
>


Mime
View raw message