You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Filip Maj <fi...@adobe.com> on 2013/03/19 23:42:26 UTC
Platform-level command line scripts
Bringing this up once more, hopefully the last time :)
TL;DR: the behavior and naming of the platform-level scripts are still not
100% lined up. I'd like to fix this and agree with you all on some of the
finer points surrounding this issue.
Benn Mapes, an intern at Adobe, has been working on adding Windows Phone
support to cordova-cli. It's been a bit of work, but the first step is to
land command line scripts at the Windows Phone project level, which he is
actively working on. With this happening, I want to make sure we have our
base project-level CLI scripts sorted properly.
Additionally, I've been seeing issues filed against the CLI with
essentially users being confused as to why the behavior of "cordova build"
vs "cordova emulate" on different platforms is different [1] [2].
The answer to all of this is that the project-level scripts have slightly
different behavior. I've looked into what each of Android, iOS and
BlackBerry (10) do and I've got a basic table sorted out (below). I would
like to get to an agreement on naming and behavior for each, and ideally
file issues to get as many of our platform implementations as possible to
implement/tweak behavior so that we are consistent on this front.
Scripts
-------
- build
- Android: equivalent of running `ant debug`, which simply compiles
your app in debug mode
- BB10: packages your app into a zip, runs `bbwp` on it, and code-signs
it
- iOS: runs a compilation with xcodebuild with configuration set to
"Debug"
- clean
- Android: equivalent of running `ant clean`, which removes any build
artifacts
- BB10: does not exist
- iOS: does not exist
- log
- Android: `adb logcat`
- BB10: does not exist
- iOS: `tail -f console.log`
- release:
- Android `ant release`, compiles with your actual signing key
- BB10: NOPE
- iOS: compiles with xcodebuild with configuration set to "Release"
- run:
- Android: runs on EITHER a connected device, or if no device, on a
running emulator, or if no running emulator, launches an emulator (and if
multiple emulator profiles exist, prompts user to pick one), then finally
runs the app on it
- BB10: asks user if there's a connected device. Then either launches a
simulator + loads the app (if user says he/she has no connected device),
or attempts runs a debug build of the app on a connected device
- iOS: launches an emulator using ios-sim with the app
- emulate:
- Android: does not exist
- BB10: does not exist
- iOS: launches an emulator using ios-sim with the app
Easy Wins
---------
- build: BB10 should change current behaviour so that it doesn't code
sign the package.
- clean: add scripts for BB10 and iOS to support this (should be dead
simple).
- release: BB10 should implement a script that runs a build + a code-sign
on the built package.
Harder Wins
-----------
There's confusing behavior with run + emulate commands across platforms.
IMO emulate should handle launching an emulator, and run should handle
deployment, with an extra flag available for run command that specifies
the deployment target (device or emulator, perhaps --device and
--emulator). Also not entirely sure how Ripple fits in here but I would
definitely like to see Ripple as the default emulator target.
Lots to chew on here but I would highly appreciate some feedback! Renaming
some of these commands is on the table too if anyone sees benefit there!
[1] https://issues.apache.org/jira/browse/CB-2722
[2] https://issues.apache.org/jira/browse/CB-2724
Re: Platform-level command line scripts
Posted by Jeffrey Heifetz <jh...@blackberry.com>.
While we're discussing the platform level scripts, should we also attempt
to standardize the arguments that can be passed in as well?
On 13-03-20 6:19 AM, "Brian LeRoux" <b...@brian.io> wrote:
>Fil: yes I like the easy wins you describe.
>
>Anis: agree on harder wins. The `emulate` cmd should require a
>parameter and only launch platform emulators. The `run` cmd should
>default to Ripple, and while we're in there we should kill the serve
>command. Also agree, we should do a download to Fruitstrap from one of
>our forks (to be safe).
>
>Tommy: would be awesome to get your help on the `release` cmd for iOS.
>
>Jesse: agree about cordova-deploy tool should just deploy. (Only I
>think we should rename it to `emulate` and have it require a
>parameter.)
>
>Mapes: we hate the Bruins ok buddy? Get over it. Also: `build` cmd is
>for debug builds and `release` cmd is for doing release builds as you
>intuited. I think you got `run` and `emulate` mixed up but the spirit
>was correct.
>
>Tim/Bryan: can we kick up a fresh thread on the BB10 business? It
>would be nice to get that in but I think those queries got lost in
>this deluge.
>
>Axe! (Parashuram's online crime fighting persona is axemclion): thanks
>for saying hi, we'd love the help yo!
>
>
>On Wed, Mar 20, 2013 at 1:14 AM, Jesse MacFadyen
><pu...@gmail.com> wrote:
>> Welcome Parashuram!
>> Happy to have some help. Benn has been working on most of this, and I
>> have created the deploy tools for wp7 and wp8, so reach out if you
>> need guidance or anything.
>>
>> Cheers,
>> Jesse
>>
>> Sent from my iPhone5
>>
>> On 2013-03-19, at 10:24 PM, "Parashuram Narasimhan (MS OPEN TECH)"
>> <pa...@microsoft.com> wrote:
>>
>> Hi,
>>
>> I could offer to start helping on the Windows Phone side of things.
>>
>> P.S: This is my first email to the group, and I think I should
>> introduce myself - I am Parashuram, working for Microsoft Open
>> Technologies Inc.
>>
>> -----Original Message-----
>> From: Filip Maj [mailto:fil@adobe.com]
>> Sent: Tuesday, March 19, 2013 3:42 PM
>> To: dev@cordova.apache.org
>> Subject: Platform-level command line scripts
>>
>> Bringing this up once more, hopefully the last time :)
>>
>> TL;DR: the behavior and naming of the platform-level scripts are still
>> not 100% lined up. I'd like to fix this and agree with you all on some
>> of the finer points surrounding this issue.
>>
>> Benn Mapes, an intern at Adobe, has been working on adding Windows
>> Phone support to cordova-cli. It's been a bit of work, but the first
>> step is to land command line scripts at the Windows Phone project
>> level, which he is actively working on. With this happening, I want to
>> make sure we have our base project-level CLI scripts sorted properly.
>>
>> Additionally, I've been seeing issues filed against the CLI with
>> essentially users being confused as to why the behavior of "cordova
>> build"
>> vs "cordova emulate" on different platforms is different [1] [2].
>>
>> The answer to all of this is that the project-level scripts have
>> slightly different behavior. I've looked into what each of Android,
>> iOS and BlackBerry (10) do and I've got a basic table sorted out
>> (below). I would like to get to an agreement on naming and behavior
>> for each, and ideally file issues to get as many of our platform
>> implementations as possible to implement/tweak behavior so that we are
>> consistent on this front.
>>
>> Scripts
>> -------
>>
>> - build
>> - Android: equivalent of running `ant debug`, which simply compiles
>> your app in debug mode
>> - BB10: packages your app into a zip, runs `bbwp` on it, and
>>code-signs it
>> - iOS: runs a compilation with xcodebuild with configuration set to
>>"Debug"
>> - clean
>> - Android: equivalent of running `ant clean`, which removes any
>> build artifacts
>> - BB10: does not exist
>> - iOS: does not exist
>> - log
>> - Android: `adb logcat`
>> - BB10: does not exist
>> - iOS: `tail -f console.log`
>> - release:
>> - Android `ant release`, compiles with your actual signing key
>> - BB10: NOPE
>> - iOS: compiles with xcodebuild with configuration set to "Release"
>> - run:
>> - Android: runs on EITHER a connected device, or if no device, on a
>> running emulator, or if no running emulator, launches an emulator (and
>> if multiple emulator profiles exist, prompts user to pick one), then
>> finally runs the app on it
>> - BB10: asks user if there's a connected device. Then either
>> launches a simulator + loads the app (if user says he/she has no
>> connected device), or attempts runs a debug build of the app on a
>> connected device
>> - iOS: launches an emulator using ios-sim with the app
>> - emulate:
>> - Android: does not exist
>> - BB10: does not exist
>> - iOS: launches an emulator using ios-sim with the app
>>
>> Easy Wins
>> ---------
>>
>> - build: BB10 should change current behaviour so that it doesn't code
>> sign the package.
>> - clean: add scripts for BB10 and iOS to support this (should be dead
>>simple).
>> - release: BB10 should implement a script that runs a build + a
>> code-sign on the built package.
>>
>> Harder Wins
>> -----------
>>
>> There's confusing behavior with run + emulate commands across platforms.
>> IMO emulate should handle launching an emulator, and run should handle
>> deployment, with an extra flag available for run command that
>> specifies the deployment target (device or emulator, perhaps --device
>> and --emulator). Also not entirely sure how Ripple fits in here but I
>> would definitely like to see Ripple as the default emulator target.
>>
>> Lots to chew on here but I would highly appreciate some feedback!
>> Renaming some of these commands is on the table too if anyone sees
>> benefit there!
>>
>> [1] https://issues.apache.org/jira/browse/CB-2722
>> [2] https://issues.apache.org/jira/browse/CB-2724
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
Re: Platform-level command line scripts
Posted by Shirley Adams <sh...@gmail.com>.
Yes... Why Not... That's part of the fun ... Isn't it?? [?]
On Thu, Mar 21, 2013 at 6:14 PM, Brian LeRoux <b...@brian.io> wrote:
> I think we can have our cake and eat it too. We should have four high
> level commands. Those commands can shell to lower level discreetly
> testable commands. The end user will never know the difference. The
> developers win the tight abstraction we seek.
>
> Make sense?
>
> On Thu, Mar 21, 2013 at 2:55 PM, Anis KADRI <an...@gmail.com> wrote:
> > On Thu, Mar 21, 2013 at 2:29 PM, Michael Brooks <
> michael@michaelbrooks.ca>wrote:
> >
> >> +1 Fil's outlined design.
> >>
> >> I'm still not convinced of what Anis and Andrew are in favour of. Having
> >> each script do more will make it more difficult for common results
> across
> >> all platforms.
> >>
> >> I really like Anis's suggestion of just four scripts. What's the
> motivation
> >> > for having many scripts? Having fewer will dramatically reduce copy &
> >> paste
> >> > bugs. It will also aid discoverability (since you'll get --help
> instead
> >> of
> >> > just "ls" and infer from the name what they do).
> >>
> >>
> >> The motivation for having many scripts is that there is a single entry
> >> point for a single action. Each action is discrete. Either a platform
> >> supports `deploy-emulator` or doesn't. If we have a single `run`
> >> entry-point, it becomes confusing whether a platform supports all
> >> requirements of the `run` action.
> >>
> >> I feel the code repetition is also a weak argument. We are defining
> >> entry-point scripts. You can refactor out the common routines (e.g.
> build)
> >> into a helper script that can be invoked by multiple scripts. As far as
> I
> >> know, this is possible in bash, batch, and Windows Script Hosting.
> >>
> >
> > I guess this topic will need a vote to follow the Apache Way. We've been
> > talking about/implementing/changing these scripts for a long time and we
> > can't seem to come to a complete agreement.
> >
> >
> >>
> >> ripple should be a separate option and not a separate command in my
> >> > opinion. To simplify things and if everyone agrees we can ignore the
> >> `run`
> >> > command flow above and launch ripple by default and ask users to
> specify
> >> > options if they want to deploy and run to a particular
> device/emulator.
> >>
> >>
> >> I feel Ripple has no place in the platform-specific scripts. I love
> Ripple,
> >> but Ripple belongs is a higher-level tool such as Cordova CLI. The
> >> platform-specific scripts are meant to deal with platform-specific
> >> functions.
> >>
> >
> > I don't have a strong opinion on this. So I could agree with you that
> this
> > Ripple could be a higher-level tool.
> >
> >
> >>
> >> Michael
> >>
> >> On Wed, Mar 20, 2013 at 8:22 PM, Benn Mapes <be...@gmail.com>
> wrote:
> >>
> >> > I liked the idea you mentioned earlier with having one wrapper script,
> >> > that way there is one entry point for the given commands for the
> needed
> >> > functionality. Then it doesn't matter what underlying scripts
> actually do
> >> > the work.
> >> >
> >> > Then our only focus would be on the commands and not so much the name
> of
> >> > the scripts.
> >> >
> >> >
> >> > On Wed, Mar 20, 2013 at 7:36 PM, Andrew Grieve <ag...@chromium.org>
> >> > wrote:
> >> >
> >> > > I really like Anis's suggestion of just four scripts. What's the
> >> > motivation
> >> > > for having many scripts? Having fewer will dramatically reduce copy
> &
> >> > paste
> >> > > bugs. It will also aid discoverability (since you'll get --help
> instead
> >> > of
> >> > > just "ls" and infer from the name what they do).
> >> > >
> >> > >
> >> > > On Wed, Mar 20, 2013 at 7:06 PM, Filip Maj <fi...@adobe.com> wrote:
> >> > >
> >> > > > Ya ya ya we're all on agreement on this specific issue. The
> >> underlying
> >> > > > platform scripts can be used regardless of whether you're using
> >> > > > cordova-cli or not.
> >> > > >
> >> > > > On 3/20/13 3:51 PM, "Anis KADRI" <an...@gmail.com> wrote:
> >> > > >
> >> > > > >On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes <
> benn.mapes@gmail.com>
> >> > > wrote:
> >> > > > >
> >> > > > >> I know that sounds
> >> > > > >> like a lot
> >> > > > >> of scripts but we're building them for the cordova-cli to use,
> >> so i
> >> > > > >>like
> >> > > > >> the idea of breaking
> >> > > > >> them out so each script does a *very specific* task with as
> >> > > > >>little-to-no
> >> > > > >>
> >> > > > >
> >> > > > >No we're not. cordova-cli is a cool tool that people can use but
> it
> >> > > should
> >> > > > >not be the only way of building Cordova apps in my opinion.
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
>
Re: Platform-level command line scripts
Posted by Tommy-Carlos Williams <to...@devgeeks.org>.
+1
On 22/03/2013, at 9:14 AM, Brian LeRoux <b...@brian.io> wrote:
> I think we can have our cake and eat it too. We should have four high
> level commands. Those commands can shell to lower level discreetly
> testable commands. The end user will never know the difference. The
> developers win the tight abstraction we seek.
>
> Make sense?
>
> On Thu, Mar 21, 2013 at 2:55 PM, Anis KADRI <an...@gmail.com> wrote:
>> On Thu, Mar 21, 2013 at 2:29 PM, Michael Brooks <mi...@michaelbrooks.ca>wrote:
>>
>>> +1 Fil's outlined design.
>>>
>>> I'm still not convinced of what Anis and Andrew are in favour of. Having
>>> each script do more will make it more difficult for common results across
>>> all platforms.
>>>
>>> I really like Anis's suggestion of just four scripts. What's the motivation
>>>> for having many scripts? Having fewer will dramatically reduce copy &
>>> paste
>>>> bugs. It will also aid discoverability (since you'll get --help instead
>>> of
>>>> just "ls" and infer from the name what they do).
>>>
>>>
>>> The motivation for having many scripts is that there is a single entry
>>> point for a single action. Each action is discrete. Either a platform
>>> supports `deploy-emulator` or doesn't. If we have a single `run`
>>> entry-point, it becomes confusing whether a platform supports all
>>> requirements of the `run` action.
>>>
>>> I feel the code repetition is also a weak argument. We are defining
>>> entry-point scripts. You can refactor out the common routines (e.g. build)
>>> into a helper script that can be invoked by multiple scripts. As far as I
>>> know, this is possible in bash, batch, and Windows Script Hosting.
>>>
>>
>> I guess this topic will need a vote to follow the Apache Way. We've been
>> talking about/implementing/changing these scripts for a long time and we
>> can't seem to come to a complete agreement.
>>
>>
>>>
>>> ripple should be a separate option and not a separate command in my
>>>> opinion. To simplify things and if everyone agrees we can ignore the
>>> `run`
>>>> command flow above and launch ripple by default and ask users to specify
>>>> options if they want to deploy and run to a particular device/emulator.
>>>
>>>
>>> I feel Ripple has no place in the platform-specific scripts. I love Ripple,
>>> but Ripple belongs is a higher-level tool such as Cordova CLI. The
>>> platform-specific scripts are meant to deal with platform-specific
>>> functions.
>>>
>>
>> I don't have a strong opinion on this. So I could agree with you that this
>> Ripple could be a higher-level tool.
>>
>>
>>>
>>> Michael
>>>
>>> On Wed, Mar 20, 2013 at 8:22 PM, Benn Mapes <be...@gmail.com> wrote:
>>>
>>>> I liked the idea you mentioned earlier with having one wrapper script,
>>>> that way there is one entry point for the given commands for the needed
>>>> functionality. Then it doesn't matter what underlying scripts actually do
>>>> the work.
>>>>
>>>> Then our only focus would be on the commands and not so much the name of
>>>> the scripts.
>>>>
>>>>
>>>> On Wed, Mar 20, 2013 at 7:36 PM, Andrew Grieve <ag...@chromium.org>
>>>> wrote:
>>>>
>>>>> I really like Anis's suggestion of just four scripts. What's the
>>>> motivation
>>>>> for having many scripts? Having fewer will dramatically reduce copy &
>>>> paste
>>>>> bugs. It will also aid discoverability (since you'll get --help instead
>>>> of
>>>>> just "ls" and infer from the name what they do).
>>>>>
>>>>>
>>>>> On Wed, Mar 20, 2013 at 7:06 PM, Filip Maj <fi...@adobe.com> wrote:
>>>>>
>>>>>> Ya ya ya we're all on agreement on this specific issue. The
>>> underlying
>>>>>> platform scripts can be used regardless of whether you're using
>>>>>> cordova-cli or not.
>>>>>>
>>>>>> On 3/20/13 3:51 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>>>>>
>>>>>>> On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes <be...@gmail.com>
>>>>> wrote:
>>>>>>>
>>>>>>>> I know that sounds
>>>>>>>> like a lot
>>>>>>>> of scripts but we're building them for the cordova-cli to use,
>>> so i
>>>>>>>> like
>>>>>>>> the idea of breaking
>>>>>>>> them out so each script does a *very specific* task with as
>>>>>>>> little-to-no
>>>>>>>>
>>>>>>>
>>>>>>> No we're not. cordova-cli is a cool tool that people can use but it
>>>>> should
>>>>>>> not be the only way of building Cordova apps in my opinion.
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
Re: Platform-level command line scripts
Posted by Filip Maj <fi...@adobe.com>.
Who's four-command proposal is it? Anis' or Andrew's?
On 3/21/13 3:14 PM, "Brian LeRoux" <b...@brian.io> wrote:
>I think we can have our cake and eat it too. We should have four high
>level commands. Those commands can shell to lower level discreetly
>testable commands. The end user will never know the difference. The
>developers win the tight abstraction we seek.
>
>Make sense?
>
>On Thu, Mar 21, 2013 at 2:55 PM, Anis KADRI <an...@gmail.com> wrote:
>> On Thu, Mar 21, 2013 at 2:29 PM, Michael Brooks
>><mi...@michaelbrooks.ca>wrote:
>>
>>> +1 Fil's outlined design.
>>>
>>> I'm still not convinced of what Anis and Andrew are in favour of.
>>>Having
>>> each script do more will make it more difficult for common results
>>>across
>>> all platforms.
>>>
>>> I really like Anis's suggestion of just four scripts. What's the
>>>motivation
>>> > for having many scripts? Having fewer will dramatically reduce copy &
>>> paste
>>> > bugs. It will also aid discoverability (since you'll get --help
>>>instead
>>> of
>>> > just "ls" and infer from the name what they do).
>>>
>>>
>>> The motivation for having many scripts is that there is a single entry
>>> point for a single action. Each action is discrete. Either a platform
>>> supports `deploy-emulator` or doesn't. If we have a single `run`
>>> entry-point, it becomes confusing whether a platform supports all
>>> requirements of the `run` action.
>>>
>>> I feel the code repetition is also a weak argument. We are defining
>>> entry-point scripts. You can refactor out the common routines (e.g.
>>>build)
>>> into a helper script that can be invoked by multiple scripts. As far
>>>as I
>>> know, this is possible in bash, batch, and Windows Script Hosting.
>>>
>>
>> I guess this topic will need a vote to follow the Apache Way. We've been
>> talking about/implementing/changing these scripts for a long time and we
>> can't seem to come to a complete agreement.
>>
>>
>>>
>>> ripple should be a separate option and not a separate command in my
>>> > opinion. To simplify things and if everyone agrees we can ignore the
>>> `run`
>>> > command flow above and launch ripple by default and ask users to
>>>specify
>>> > options if they want to deploy and run to a particular
>>>device/emulator.
>>>
>>>
>>> I feel Ripple has no place in the platform-specific scripts. I love
>>>Ripple,
>>> but Ripple belongs is a higher-level tool such as Cordova CLI. The
>>> platform-specific scripts are meant to deal with platform-specific
>>> functions.
>>>
>>
>> I don't have a strong opinion on this. So I could agree with you that
>>this
>> Ripple could be a higher-level tool.
>>
>>
>>>
>>> Michael
>>>
>>> On Wed, Mar 20, 2013 at 8:22 PM, Benn Mapes <be...@gmail.com>
>>>wrote:
>>>
>>> > I liked the idea you mentioned earlier with having one wrapper
>>>script,
>>> > that way there is one entry point for the given commands for the
>>>needed
>>> > functionality. Then it doesn't matter what underlying scripts
>>>actually do
>>> > the work.
>>> >
>>> > Then our only focus would be on the commands and not so much the
>>>name of
>>> > the scripts.
>>> >
>>> >
>>> > On Wed, Mar 20, 2013 at 7:36 PM, Andrew Grieve <ag...@chromium.org>
>>> > wrote:
>>> >
>>> > > I really like Anis's suggestion of just four scripts. What's the
>>> > motivation
>>> > > for having many scripts? Having fewer will dramatically reduce
>>>copy &
>>> > paste
>>> > > bugs. It will also aid discoverability (since you'll get --help
>>>instead
>>> > of
>>> > > just "ls" and infer from the name what they do).
>>> > >
>>> > >
>>> > > On Wed, Mar 20, 2013 at 7:06 PM, Filip Maj <fi...@adobe.com> wrote:
>>> > >
>>> > > > Ya ya ya we're all on agreement on this specific issue. The
>>> underlying
>>> > > > platform scripts can be used regardless of whether you're using
>>> > > > cordova-cli or not.
>>> > > >
>>> > > > On 3/20/13 3:51 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>> > > >
>>> > > > >On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes
>>><be...@gmail.com>
>>> > > wrote:
>>> > > > >
>>> > > > >> I know that sounds
>>> > > > >> like a lot
>>> > > > >> of scripts but we're building them for the cordova-cli to use,
>>> so i
>>> > > > >>like
>>> > > > >> the idea of breaking
>>> > > > >> them out so each script does a *very specific* task with as
>>> > > > >>little-to-no
>>> > > > >>
>>> > > > >
>>> > > > >No we're not. cordova-cli is a cool tool that people can use
>>>but it
>>> > > should
>>> > > > >not be the only way of building Cordova apps in my opinion.
>>> > > >
>>> > > >
>>> > >
>>> >
>>>
Re: Platform-level command line scripts
Posted by Brian LeRoux <b...@brian.io>.
I think we can have our cake and eat it too. We should have four high
level commands. Those commands can shell to lower level discreetly
testable commands. The end user will never know the difference. The
developers win the tight abstraction we seek.
Make sense?
On Thu, Mar 21, 2013 at 2:55 PM, Anis KADRI <an...@gmail.com> wrote:
> On Thu, Mar 21, 2013 at 2:29 PM, Michael Brooks <mi...@michaelbrooks.ca>wrote:
>
>> +1 Fil's outlined design.
>>
>> I'm still not convinced of what Anis and Andrew are in favour of. Having
>> each script do more will make it more difficult for common results across
>> all platforms.
>>
>> I really like Anis's suggestion of just four scripts. What's the motivation
>> > for having many scripts? Having fewer will dramatically reduce copy &
>> paste
>> > bugs. It will also aid discoverability (since you'll get --help instead
>> of
>> > just "ls" and infer from the name what they do).
>>
>>
>> The motivation for having many scripts is that there is a single entry
>> point for a single action. Each action is discrete. Either a platform
>> supports `deploy-emulator` or doesn't. If we have a single `run`
>> entry-point, it becomes confusing whether a platform supports all
>> requirements of the `run` action.
>>
>> I feel the code repetition is also a weak argument. We are defining
>> entry-point scripts. You can refactor out the common routines (e.g. build)
>> into a helper script that can be invoked by multiple scripts. As far as I
>> know, this is possible in bash, batch, and Windows Script Hosting.
>>
>
> I guess this topic will need a vote to follow the Apache Way. We've been
> talking about/implementing/changing these scripts for a long time and we
> can't seem to come to a complete agreement.
>
>
>>
>> ripple should be a separate option and not a separate command in my
>> > opinion. To simplify things and if everyone agrees we can ignore the
>> `run`
>> > command flow above and launch ripple by default and ask users to specify
>> > options if they want to deploy and run to a particular device/emulator.
>>
>>
>> I feel Ripple has no place in the platform-specific scripts. I love Ripple,
>> but Ripple belongs is a higher-level tool such as Cordova CLI. The
>> platform-specific scripts are meant to deal with platform-specific
>> functions.
>>
>
> I don't have a strong opinion on this. So I could agree with you that this
> Ripple could be a higher-level tool.
>
>
>>
>> Michael
>>
>> On Wed, Mar 20, 2013 at 8:22 PM, Benn Mapes <be...@gmail.com> wrote:
>>
>> > I liked the idea you mentioned earlier with having one wrapper script,
>> > that way there is one entry point for the given commands for the needed
>> > functionality. Then it doesn't matter what underlying scripts actually do
>> > the work.
>> >
>> > Then our only focus would be on the commands and not so much the name of
>> > the scripts.
>> >
>> >
>> > On Wed, Mar 20, 2013 at 7:36 PM, Andrew Grieve <ag...@chromium.org>
>> > wrote:
>> >
>> > > I really like Anis's suggestion of just four scripts. What's the
>> > motivation
>> > > for having many scripts? Having fewer will dramatically reduce copy &
>> > paste
>> > > bugs. It will also aid discoverability (since you'll get --help instead
>> > of
>> > > just "ls" and infer from the name what they do).
>> > >
>> > >
>> > > On Wed, Mar 20, 2013 at 7:06 PM, Filip Maj <fi...@adobe.com> wrote:
>> > >
>> > > > Ya ya ya we're all on agreement on this specific issue. The
>> underlying
>> > > > platform scripts can be used regardless of whether you're using
>> > > > cordova-cli or not.
>> > > >
>> > > > On 3/20/13 3:51 PM, "Anis KADRI" <an...@gmail.com> wrote:
>> > > >
>> > > > >On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes <be...@gmail.com>
>> > > wrote:
>> > > > >
>> > > > >> I know that sounds
>> > > > >> like a lot
>> > > > >> of scripts but we're building them for the cordova-cli to use,
>> so i
>> > > > >>like
>> > > > >> the idea of breaking
>> > > > >> them out so each script does a *very specific* task with as
>> > > > >>little-to-no
>> > > > >>
>> > > > >
>> > > > >No we're not. cordova-cli is a cool tool that people can use but it
>> > > should
>> > > > >not be the only way of building Cordova apps in my opinion.
>> > > >
>> > > >
>> > >
>> >
>>
Re: Platform-level command line scripts
Posted by Anis KADRI <an...@gmail.com>.
On Thu, Mar 21, 2013 at 2:29 PM, Michael Brooks <mi...@michaelbrooks.ca>wrote:
> +1 Fil's outlined design.
>
> I'm still not convinced of what Anis and Andrew are in favour of. Having
> each script do more will make it more difficult for common results across
> all platforms.
>
> I really like Anis's suggestion of just four scripts. What's the motivation
> > for having many scripts? Having fewer will dramatically reduce copy &
> paste
> > bugs. It will also aid discoverability (since you'll get --help instead
> of
> > just "ls" and infer from the name what they do).
>
>
> The motivation for having many scripts is that there is a single entry
> point for a single action. Each action is discrete. Either a platform
> supports `deploy-emulator` or doesn't. If we have a single `run`
> entry-point, it becomes confusing whether a platform supports all
> requirements of the `run` action.
>
> I feel the code repetition is also a weak argument. We are defining
> entry-point scripts. You can refactor out the common routines (e.g. build)
> into a helper script that can be invoked by multiple scripts. As far as I
> know, this is possible in bash, batch, and Windows Script Hosting.
>
I guess this topic will need a vote to follow the Apache Way. We've been
talking about/implementing/changing these scripts for a long time and we
can't seem to come to a complete agreement.
>
> ripple should be a separate option and not a separate command in my
> > opinion. To simplify things and if everyone agrees we can ignore the
> `run`
> > command flow above and launch ripple by default and ask users to specify
> > options if they want to deploy and run to a particular device/emulator.
>
>
> I feel Ripple has no place in the platform-specific scripts. I love Ripple,
> but Ripple belongs is a higher-level tool such as Cordova CLI. The
> platform-specific scripts are meant to deal with platform-specific
> functions.
>
I don't have a strong opinion on this. So I could agree with you that this
Ripple could be a higher-level tool.
>
> Michael
>
> On Wed, Mar 20, 2013 at 8:22 PM, Benn Mapes <be...@gmail.com> wrote:
>
> > I liked the idea you mentioned earlier with having one wrapper script,
> > that way there is one entry point for the given commands for the needed
> > functionality. Then it doesn't matter what underlying scripts actually do
> > the work.
> >
> > Then our only focus would be on the commands and not so much the name of
> > the scripts.
> >
> >
> > On Wed, Mar 20, 2013 at 7:36 PM, Andrew Grieve <ag...@chromium.org>
> > wrote:
> >
> > > I really like Anis's suggestion of just four scripts. What's the
> > motivation
> > > for having many scripts? Having fewer will dramatically reduce copy &
> > paste
> > > bugs. It will also aid discoverability (since you'll get --help instead
> > of
> > > just "ls" and infer from the name what they do).
> > >
> > >
> > > On Wed, Mar 20, 2013 at 7:06 PM, Filip Maj <fi...@adobe.com> wrote:
> > >
> > > > Ya ya ya we're all on agreement on this specific issue. The
> underlying
> > > > platform scripts can be used regardless of whether you're using
> > > > cordova-cli or not.
> > > >
> > > > On 3/20/13 3:51 PM, "Anis KADRI" <an...@gmail.com> wrote:
> > > >
> > > > >On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes <be...@gmail.com>
> > > wrote:
> > > > >
> > > > >> I know that sounds
> > > > >> like a lot
> > > > >> of scripts but we're building them for the cordova-cli to use,
> so i
> > > > >>like
> > > > >> the idea of breaking
> > > > >> them out so each script does a *very specific* task with as
> > > > >>little-to-no
> > > > >>
> > > > >
> > > > >No we're not. cordova-cli is a cool tool that people can use but it
> > > should
> > > > >not be the only way of building Cordova apps in my opinion.
> > > >
> > > >
> > >
> >
>
Re: Platform-level command line scripts
Posted by Michael Brooks <mi...@michaelbrooks.ca>.
+1 Fil's outlined design.
I'm still not convinced of what Anis and Andrew are in favour of. Having
each script do more will make it more difficult for common results across
all platforms.
I really like Anis's suggestion of just four scripts. What's the motivation
> for having many scripts? Having fewer will dramatically reduce copy & paste
> bugs. It will also aid discoverability (since you'll get --help instead of
> just "ls" and infer from the name what they do).
The motivation for having many scripts is that there is a single entry
point for a single action. Each action is discrete. Either a platform
supports `deploy-emulator` or doesn't. If we have a single `run`
entry-point, it becomes confusing whether a platform supports all
requirements of the `run` action.
I feel the code repetition is also a weak argument. We are defining
entry-point scripts. You can refactor out the common routines (e.g. build)
into a helper script that can be invoked by multiple scripts. As far as I
know, this is possible in bash, batch, and Windows Script Hosting.
ripple should be a separate option and not a separate command in my
> opinion. To simplify things and if everyone agrees we can ignore the `run`
> command flow above and launch ripple by default and ask users to specify
> options if they want to deploy and run to a particular device/emulator.
I feel Ripple has no place in the platform-specific scripts. I love Ripple,
but Ripple belongs is a higher-level tool such as Cordova CLI. The
platform-specific scripts are meant to deal with platform-specific
functions.
Michael
On Wed, Mar 20, 2013 at 8:22 PM, Benn Mapes <be...@gmail.com> wrote:
> I liked the idea you mentioned earlier with having one wrapper script,
> that way there is one entry point for the given commands for the needed
> functionality. Then it doesn't matter what underlying scripts actually do
> the work.
>
> Then our only focus would be on the commands and not so much the name of
> the scripts.
>
>
> On Wed, Mar 20, 2013 at 7:36 PM, Andrew Grieve <ag...@chromium.org>
> wrote:
>
> > I really like Anis's suggestion of just four scripts. What's the
> motivation
> > for having many scripts? Having fewer will dramatically reduce copy &
> paste
> > bugs. It will also aid discoverability (since you'll get --help instead
> of
> > just "ls" and infer from the name what they do).
> >
> >
> > On Wed, Mar 20, 2013 at 7:06 PM, Filip Maj <fi...@adobe.com> wrote:
> >
> > > Ya ya ya we're all on agreement on this specific issue. The underlying
> > > platform scripts can be used regardless of whether you're using
> > > cordova-cli or not.
> > >
> > > On 3/20/13 3:51 PM, "Anis KADRI" <an...@gmail.com> wrote:
> > >
> > > >On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes <be...@gmail.com>
> > wrote:
> > > >
> > > >> I know that sounds
> > > >> like a lot
> > > >> of scripts but we're building them for the cordova-cli to use, so i
> > > >>like
> > > >> the idea of breaking
> > > >> them out so each script does a *very specific* task with as
> > > >>little-to-no
> > > >>
> > > >
> > > >No we're not. cordova-cli is a cool tool that people can use but it
> > should
> > > >not be the only way of building Cordova apps in my opinion.
> > >
> > >
> >
>
Re: Platform-level command line scripts
Posted by Benn Mapes <be...@gmail.com>.
I liked the idea you mentioned earlier with having one wrapper script,
that way there is one entry point for the given commands for the needed
functionality. Then it doesn't matter what underlying scripts actually do
the work.
Then our only focus would be on the commands and not so much the name of
the scripts.
On Wed, Mar 20, 2013 at 7:36 PM, Andrew Grieve <ag...@chromium.org> wrote:
> I really like Anis's suggestion of just four scripts. What's the motivation
> for having many scripts? Having fewer will dramatically reduce copy & paste
> bugs. It will also aid discoverability (since you'll get --help instead of
> just "ls" and infer from the name what they do).
>
>
> On Wed, Mar 20, 2013 at 7:06 PM, Filip Maj <fi...@adobe.com> wrote:
>
> > Ya ya ya we're all on agreement on this specific issue. The underlying
> > platform scripts can be used regardless of whether you're using
> > cordova-cli or not.
> >
> > On 3/20/13 3:51 PM, "Anis KADRI" <an...@gmail.com> wrote:
> >
> > >On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes <be...@gmail.com>
> wrote:
> > >
> > >> I know that sounds
> > >> like a lot
> > >> of scripts but we're building them for the cordova-cli to use, so i
> > >>like
> > >> the idea of breaking
> > >> them out so each script does a *very specific* task with as
> > >>little-to-no
> > >>
> > >
> > >No we're not. cordova-cli is a cool tool that people can use but it
> should
> > >not be the only way of building Cordova apps in my opinion.
> >
> >
>
Re: Platform-level command line scripts
Posted by Filip Maj <fi...@adobe.com>.
Sounds reasonable. I like small focused scripts but the argument of
duplicated code across different files is a good one.
On 3/20/13 7:36 PM, "Andrew Grieve" <ag...@chromium.org> wrote:
>I really like Anis's suggestion of just four scripts. What's the
>motivation
>for having many scripts? Having fewer will dramatically reduce copy &
>paste
>bugs. It will also aid discoverability (since you'll get --help instead of
>just "ls" and infer from the name what they do).
>
>
>On Wed, Mar 20, 2013 at 7:06 PM, Filip Maj <fi...@adobe.com> wrote:
>
>> Ya ya ya we're all on agreement on this specific issue. The underlying
>> platform scripts can be used regardless of whether you're using
>> cordova-cli or not.
>>
>> On 3/20/13 3:51 PM, "Anis KADRI" <an...@gmail.com> wrote:
>>
>> >On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes <be...@gmail.com>
>>wrote:
>> >
>> >> I know that sounds
>> >> like a lot
>> >> of scripts but we're building them for the cordova-cli to use, so i
>> >>like
>> >> the idea of breaking
>> >> them out so each script does a *very specific* task with as
>> >>little-to-no
>> >>
>> >
>> >No we're not. cordova-cli is a cool tool that people can use but it
>>should
>> >not be the only way of building Cordova apps in my opinion.
>>
>>
Re: Platform-level command line scripts
Posted by Andrew Grieve <ag...@chromium.org>.
I really like Anis's suggestion of just four scripts. What's the motivation
for having many scripts? Having fewer will dramatically reduce copy & paste
bugs. It will also aid discoverability (since you'll get --help instead of
just "ls" and infer from the name what they do).
On Wed, Mar 20, 2013 at 7:06 PM, Filip Maj <fi...@adobe.com> wrote:
> Ya ya ya we're all on agreement on this specific issue. The underlying
> platform scripts can be used regardless of whether you're using
> cordova-cli or not.
>
> On 3/20/13 3:51 PM, "Anis KADRI" <an...@gmail.com> wrote:
>
> >On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes <be...@gmail.com> wrote:
> >
> >> I know that sounds
> >> like a lot
> >> of scripts but we're building them for the cordova-cli to use, so i
> >>like
> >> the idea of breaking
> >> them out so each script does a *very specific* task with as
> >>little-to-no
> >>
> >
> >No we're not. cordova-cli is a cool tool that people can use but it should
> >not be the only way of building Cordova apps in my opinion.
>
>
Re: Platform-level command line scripts
Posted by Filip Maj <fi...@adobe.com>.
Ya ya ya we're all on agreement on this specific issue. The underlying
platform scripts can be used regardless of whether you're using
cordova-cli or not.
On 3/20/13 3:51 PM, "Anis KADRI" <an...@gmail.com> wrote:
>On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes <be...@gmail.com> wrote:
>
>> I know that sounds
>> like a lot
>> of scripts but we're building them for the cordova-cli to use, so i
>>like
>> the idea of breaking
>> them out so each script does a *very specific* task with as
>>little-to-no
>>
>
>No we're not. cordova-cli is a cool tool that people can use but it should
>not be the only way of building Cordova apps in my opinion.
Re: Platform-level command line scripts
Posted by Anis KADRI <an...@gmail.com>.
On Wed, Mar 20, 2013 at 3:43 PM, Benn Mapes <be...@gmail.com> wrote:
> I know that sounds
> like a lot
> of scripts but we're building them for the cordova-cli to use, so i like
> the idea of breaking
> them out so each script does a *very specific* task with as little-to-no
>
No we're not. cordova-cli is a cool tool that people can use but it should
not be the only way of building Cordova apps in my opinion.
Re: Platform-level command line scripts
Posted by Benn Mapes <be...@gmail.com>.
Thanks for the summary Fil, I like where this is going. I know that sounds
like a lot
of scripts but we're building them for the cordova-cli to use, so i like
the idea of breaking
them out so each script does a *very specific* task with as little-to-no
(the cli can handle that):
clean, log, start-emulator, deploy-device, deploy-emulator, compile-debug,
compile-release
I think these are all good names for the scripts, start-emulator would
be useful if the person
is trying to test on multiple emulators. We can figure out what to do with
ripple later but it would
be nice to come to a consensus ASAP on the name/functionality of these
scripts.
+1 for every platform having ALL scripts and just "operation not supported"
for ones it can't implement.
~Benn
On Wed, Mar 20, 2013 at 2:15 PM, Anis KADRI <an...@gmail.com> wrote:
> I counted...there are 8 commands in total in your thread. With all the
> disparities across platforms, it's going to be hard to come to an exact
> match. If we want to sort this out cleanly and easily, I believe we should
> as few commands as possible.
>
> I think there should not be more than 4 (build, clean, log, run) and
> potentially adding options for the rest.
>
> * `build`: Compiles & packages. Add an option for release/debug mode.
> Default should be debug.
> * `clean`: Obvious.
> * `log`: tail -f logs. Again add an option if you want to filter which
> device/emulator you want to log otherwise default to whatever filter the
> SDK command picks (if present).
> * `run`: THIS is the tricky one. Should just deploy to device/emulator! You
> can also add an option to specify which emulator/device/ripple. Should
> always be preceded by `build` because you obviously can't run something
> that is not built ;)
>
> For the `run` command I believe the default (& complicated :) flow should
> be:
>
> If device(s) connected:
> * Pick device (ignore emulators).
> * Prompt, timeout and pick first one (5 to 10 seconds) if multiple devices
> are connected (ignore emulators).
>
> If device(s) not connected:
> * Emulator if it is running
> * Prompt, timeout and pick first one (5 to 10 seconds) if multiple
> emulators are running.
> * Start emulator. If you have multiple ones set up (Android's case),
> prompt, timeout and launch first one (5 to 10 seconds).
>
> ripple should be a separate option and not a separate command in my
> opinion. To simplify things and if everyone agrees we can ignore the `run`
> command flow above and launch ripple by default and ask users to specify
> options if they want to deploy and run to a particular device/emulator.
>
> Totally agree on the "operation not supported" for every command that is
> not supported on a specific platform but the command should always be
> present.
>
> First step would be to have the exact same commands on all platforms (no
> more, no less and we're not there as of this writing). Second step would be
> to get them to do the same actions as much as possible (this will be
> difficult because of all the disparities: no logging on Windows... and
> requirements: FruitStrap etc..).
>
> -a
>
> On Wed, Mar 20, 2013 at 1:26 PM, Filip Maj <fi...@adobe.com> wrote:
>
> > Thanks everyone for chiming in, really appreciate this.
> >
> > I'm of the same opinion as Michael. The current confusion started because
> > of (arguably) ambiguous terminology used for script names and no explicit
> > behavior for each listed out. My goal is to arrive at a consensus on the
> > naming and behavior of various scripts.
> >
> > The objectives for the scripts should be:
> > - each script is unambiguously named and does a single, explicit task
> > (that we formalize in this thread)
> > - all platforms implement each script, with a default of exiting with
> > non-zero code and logging out "unsupported" if the implementation is not
> > possible or not done at this time
> >
> > Based on everyone's responses, here's my first crack at the scripts (with
> > questions under each). Also note that I'm open to having some of this
> > functionality under one command with specific flags, like deployment and
> > compilation. I just want to guide the discussion towards agreement.
> >
> > 1. `clean`: rm -rf's any compilation artifacts.
> >
> > 2. `log`: streams logs (console.log/error/dir) from a running cordova
> > application.
> > - say you have emulators running and multiple devices connected with
> > multiple cordova apps running. Which log do we stream?
> >
> > 3. `start-emulator` (was `emulate`): kicks up an emulator for the
> platform.
> > - some platforms allow for defining different emulators. How to handle
> > this? I.e. Which AVD to pick for android, which simulator for what iOS
> > version + model (if this is applicable for iOS), same for windows phone,
> > etc.
> > - do we want to include Ripple in the list for the above question, or
> > split this out into its own? I think I'd prefer `deploy-ripple`
> personally.
> >
> > 4. `deploy-device`, `deploy-emulator` (and possibly `deploy-ripple`).
> > Deploys a compiled app to the specified target.
> > - what if you have multiple devices/emulators running for the specified
> > platform?
> > - if there are no compiled bits, does this automatically invoke the
> > `compile` or `build` command (below)?
> > - if you run `deploy-emulator`, but don't have an emulator started, does
> > it run `start-emulator` ?
> >
> > 5. `compile-debug` or `compile-release` (or `build` instead of
> `compile`).
> > Runs the appropriate compilation.
> >
> > Discuss!
> >
> >
> > On 3/20/13 1:04 PM, "Michael Brooks" <mi...@michaelbrooks.ca> wrote:
> >
> > >I think this thread is starting to diverge from its purpose and step
> into
> > >the responsibilities of the Cordova CLI.
> > >
> > >Easy Wins
> > >> ---------
> > >
> > >
> > >Fil, I agree with your easy wins. Thanks for summarizing the current
> state
> > >of the platform-specific scripts.
> > >
> > >It would also be good to have a stubbed implemented of each script on
> each
> > >platform. For example, if a platform does not yet support "log" then it
> > >should still have a log script that echo's "logging is unuspported."
> This
> > >allows the Cordova CLI is "shell out" to the scripts without having to
> > >check whether the platform has indeed implemented something.
> > >
> > >Harder Wins
> > >> -----------
> > >
> > >
> > >This deserves it's own thread. There seems to be a lot of confusion
> around
> > >the difference between and role of Cordova CLI commands and
> > >Platform-specific scripts. Some of the above replies are mixing or
> > >interchanging those terms.
> > >
> > >For platform-specific scripts, I believe a simple and explicit nature is
> > >critical. A script must do one thing and only one thing. If we deviate
> > >from
> > >this, then platform-specific scripts will likely act different for each
> > >platform.
> > >
> > >Michael
> > >
> > >On Wed, Mar 20, 2013 at 8:59 AM, Ken Wallis <kw...@blackberry.com>
> > >wrote:
> > >
> > >> Deploy vs. Emulate: Deploy could be used to deploy to anything,
> > >>emulator,
> > >> ripple, simulator, or actual device. I think perhaps deploy is the
> > >>right
> > >> terminology in this regard than emulate?
> > >>
> > >> I agree with Jeff that it would be valuable to standardize arguments
> as
> > >> well, in so far as those those that are common across platforms.
> > >> --
> > >>
> > >> Ken Wallis
> > >>
> > >> Product Manager WebWorks
> > >>
> > >> BlackBerry
> > >>
> > >> 289-261-4369
> > >>
> > >> ________________________________________
> > >> From: agrieve@google.com [agrieve@google.com] on behalf of Andrew
> > >>Grieve [
> > >> agrieve@chromium.org]
> > >> Sent: Wednesday, March 20, 2013 11:09 AM
> > >> To: dev
> > >> Subject: Re: Platform-level command line scripts
> > >>
> > >> I like the suggestions of having fewer commands. Actually, why not
> have
> > >> just one command? It would make for less copy/paste, and you'd only
> > >>have to
> > >> use a single --help to see what you can do.
> > >>
> > >> E.g.:
> > >>
> > >> ./cordova/cli.js build --profile=release
> > >> ./cordova/cli.js build --profile=debug
> > >> ./cordova/cli.js clean
> > >> ./cordova/cli.js package // For app store
> > >> ./cordova/cli.js log
> > >> ./cordova/cli.js run --target=DEVICE_ID
> > >> ./cordova/cli.js run --target=EMULATOR_ID
> > >> ./cordova/cli.js run --target=ripple
> > >> ./cordova/cli.js run --target=emulator
> > >> ./cordova/cli.js run --target=emulator
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> On Wed, Mar 20, 2013 at 6:19 AM, Brian LeRoux <b...@brian.io> wrote:
> > >>
> > >> > Fil: yes I like the easy wins you describe.
> > >> >
> > >> > Anis: agree on harder wins. The `emulate` cmd should require a
> > >> > parameter and only launch platform emulators. The `run` cmd should
> > >> > default to Ripple, and while we're in there we should kill the serve
> > >> > command. Also agree, we should do a download to Fruitstrap from one
> of
> > >> > our forks (to be safe).
> > >> >
> > >> > Tommy: would be awesome to get your help on the `release` cmd for
> iOS.
> > >> >
> > >> > Jesse: agree about cordova-deploy tool should just deploy. (Only I
> > >> > think we should rename it to `emulate` and have it require a
> > >> > parameter.)
> > >> >
> > >> > Mapes: we hate the Bruins ok buddy? Get over it. Also: `build` cmd
> is
> > >> > for debug builds and `release` cmd is for doing release builds as
> you
> > >> > intuited. I think you got `run` and `emulate` mixed up but the
> spirit
> > >> > was correct.
> > >> >
> > >> > Tim/Bryan: can we kick up a fresh thread on the BB10 business? It
> > >> > would be nice to get that in but I think those queries got lost in
> > >> > this deluge.
> > >> >
> > >> > Axe! (Parashuram's online crime fighting persona is axemclion):
> thanks
> > >> > for saying hi, we'd love the help yo!
> > >> >
> > >> >
> > >> > On Wed, Mar 20, 2013 at 1:14 AM, Jesse MacFadyen
> > >> > <pu...@gmail.com> wrote:
> > >> > > Welcome Parashuram!
> > >> > > Happy to have some help. Benn has been working on most of this,
> and
> > >>I
> > >> > > have created the deploy tools for wp7 and wp8, so reach out if you
> > >> > > need guidance or anything.
> > >> > >
> > >> > > Cheers,
> > >> > > Jesse
> > >> > >
> > >> > > Sent from my iPhone5
> > >> > >
> > >> > > On 2013-03-19, at 10:24 PM, "Parashuram Narasimhan (MS OPEN TECH)"
> > >> > > <pa...@microsoft.com> wrote:
> > >> > >
> > >> > > Hi,
> > >> > >
> > >> > > I could offer to start helping on the Windows Phone side of
> things.
> > >> > >
> > >> > > P.S: This is my first email to the group, and I think I should
> > >> > > introduce myself - I am Parashuram, working for Microsoft Open
> > >> > > Technologies Inc.
> > >> > >
> > >> > > -----Original Message-----
> > >> > > From: Filip Maj [mailto:fil@adobe.com]
> > >> > > Sent: Tuesday, March 19, 2013 3:42 PM
> > >> > > To: dev@cordova.apache.org
> > >> > > Subject: Platform-level command line scripts
> > >> > >
> > >> > > Bringing this up once more, hopefully the last time :)
> > >> > >
> > >> > > TL;DR: the behavior and naming of the platform-level scripts are
> > >>still
> > >> > > not 100% lined up. I'd like to fix this and agree with you all on
> > >>some
> > >> > > of the finer points surrounding this issue.
> > >> > >
> > >> > > Benn Mapes, an intern at Adobe, has been working on adding Windows
> > >> > > Phone support to cordova-cli. It's been a bit of work, but the
> first
> > >> > > step is to land command line scripts at the Windows Phone project
> > >> > > level, which he is actively working on. With this happening, I
> want
> > >>to
> > >> > > make sure we have our base project-level CLI scripts sorted
> > >>properly.
> > >> > >
> > >> > > Additionally, I've been seeing issues filed against the CLI with
> > >> > > essentially users being confused as to why the behavior of
> "cordova
> > >> > > build"
> > >> > > vs "cordova emulate" on different platforms is different [1] [2].
> > >> > >
> > >> > > The answer to all of this is that the project-level scripts have
> > >> > > slightly different behavior. I've looked into what each of
> Android,
> > >> > > iOS and BlackBerry (10) do and I've got a basic table sorted out
> > >> > > (below). I would like to get to an agreement on naming and
> behavior
> > >> > > for each, and ideally file issues to get as many of our platform
> > >> > > implementations as possible to implement/tweak behavior so that we
> > >>are
> > >> > > consistent on this front.
> > >> > >
> > >> > > Scripts
> > >> > > -------
> > >> > >
> > >> > > - build
> > >> > > - Android: equivalent of running `ant debug`, which simply
> > >>compiles
> > >> > > your app in debug mode
> > >> > > - BB10: packages your app into a zip, runs `bbwp` on it, and
> > >> > code-signs it
> > >> > > - iOS: runs a compilation with xcodebuild with configuration set
> > >>to
> > >> > "Debug"
> > >> > > - clean
> > >> > > - Android: equivalent of running `ant clean`, which removes any
> > >> > > build artifacts
> > >> > > - BB10: does not exist
> > >> > > - iOS: does not exist
> > >> > > - log
> > >> > > - Android: `adb logcat`
> > >> > > - BB10: does not exist
> > >> > > - iOS: `tail -f console.log`
> > >> > > - release:
> > >> > > - Android `ant release`, compiles with your actual signing key
> > >> > > - BB10: NOPE
> > >> > > - iOS: compiles with xcodebuild with configuration set to
> > >>"Release"
> > >> > > - run:
> > >> > > - Android: runs on EITHER a connected device, or if no device,
> on
> > >>a
> > >> > > running emulator, or if no running emulator, launches an emulator
> > >>(and
> > >> > > if multiple emulator profiles exist, prompts user to pick one),
> then
> > >> > > finally runs the app on it
> > >> > > - BB10: asks user if there's a connected device. Then either
> > >> > > launches a simulator + loads the app (if user says he/she has no
> > >> > > connected device), or attempts runs a debug build of the app on a
> > >> > > connected device
> > >> > > - iOS: launches an emulator using ios-sim with the app
> > >> > > - emulate:
> > >> > > - Android: does not exist
> > >> > > - BB10: does not exist
> > >> > > - iOS: launches an emulator using ios-sim with the app
> > >> > >
> > >> > > Easy Wins
> > >> > > ---------
> > >> > >
> > >> > > - build: BB10 should change current behaviour so that it doesn't
> > >>code
> > >> > > sign the package.
> > >> > > - clean: add scripts for BB10 and iOS to support this (should be
> > >>dead
> > >> > simple).
> > >> > > - release: BB10 should implement a script that runs a build + a
> > >> > > code-sign on the built package.
> > >> > >
> > >> > > Harder Wins
> > >> > > -----------
> > >> > >
> > >> > > There's confusing behavior with run + emulate commands across
> > >> platforms.
> > >> > > IMO emulate should handle launching an emulator, and run should
> > >>handle
> > >> > > deployment, with an extra flag available for run command that
> > >> > > specifies the deployment target (device or emulator, perhaps
> > >>--device
> > >> > > and --emulator). Also not entirely sure how Ripple fits in here
> but
> > >>I
> > >> > > would definitely like to see Ripple as the default emulator
> target.
> > >> > >
> > >> > > Lots to chew on here but I would highly appreciate some feedback!
> > >> > > Renaming some of these commands is on the table too if anyone sees
> > >> > > benefit there!
> > >> > >
> > >> > > [1] https://issues.apache.org/jira/browse/CB-2722
> > >> > > [2] https://issues.apache.org/jira/browse/CB-2724
> > >> >
> > >>
> > >> ---------------------------------------------------------------------
> > >> This transmission (including any attachments) may contain confidential
> > >> information, privileged material (including material protected by the
> > >> solicitor-client or other applicable privileges), or constitute
> > >>non-public
> > >> information. Any use of this information by anyone other than the
> > >>intended
> > >> recipient is prohibited. If you have received this transmission in
> > >>error,
> > >> please immediately reply to the sender and delete this information
> from
> > >> your system. Use, dissemination, distribution, or reproduction of this
> > >> transmission by unintended recipients is not authorized and may be
> > >>unlawful.
> > >>
> >
> >
>
Re: Platform-level command line scripts
Posted by Anis KADRI <an...@gmail.com>.
I counted...there are 8 commands in total in your thread. With all the
disparities across platforms, it's going to be hard to come to an exact
match. If we want to sort this out cleanly and easily, I believe we should
as few commands as possible.
I think there should not be more than 4 (build, clean, log, run) and
potentially adding options for the rest.
* `build`: Compiles & packages. Add an option for release/debug mode.
Default should be debug.
* `clean`: Obvious.
* `log`: tail -f logs. Again add an option if you want to filter which
device/emulator you want to log otherwise default to whatever filter the
SDK command picks (if present).
* `run`: THIS is the tricky one. Should just deploy to device/emulator! You
can also add an option to specify which emulator/device/ripple. Should
always be preceded by `build` because you obviously can't run something
that is not built ;)
For the `run` command I believe the default (& complicated :) flow should
be:
If device(s) connected:
* Pick device (ignore emulators).
* Prompt, timeout and pick first one (5 to 10 seconds) if multiple devices
are connected (ignore emulators).
If device(s) not connected:
* Emulator if it is running
* Prompt, timeout and pick first one (5 to 10 seconds) if multiple
emulators are running.
* Start emulator. If you have multiple ones set up (Android's case),
prompt, timeout and launch first one (5 to 10 seconds).
ripple should be a separate option and not a separate command in my
opinion. To simplify things and if everyone agrees we can ignore the `run`
command flow above and launch ripple by default and ask users to specify
options if they want to deploy and run to a particular device/emulator.
Totally agree on the "operation not supported" for every command that is
not supported on a specific platform but the command should always be
present.
First step would be to have the exact same commands on all platforms (no
more, no less and we're not there as of this writing). Second step would be
to get them to do the same actions as much as possible (this will be
difficult because of all the disparities: no logging on Windows... and
requirements: FruitStrap etc..).
-a
On Wed, Mar 20, 2013 at 1:26 PM, Filip Maj <fi...@adobe.com> wrote:
> Thanks everyone for chiming in, really appreciate this.
>
> I'm of the same opinion as Michael. The current confusion started because
> of (arguably) ambiguous terminology used for script names and no explicit
> behavior for each listed out. My goal is to arrive at a consensus on the
> naming and behavior of various scripts.
>
> The objectives for the scripts should be:
> - each script is unambiguously named and does a single, explicit task
> (that we formalize in this thread)
> - all platforms implement each script, with a default of exiting with
> non-zero code and logging out "unsupported" if the implementation is not
> possible or not done at this time
>
> Based on everyone's responses, here's my first crack at the scripts (with
> questions under each). Also note that I'm open to having some of this
> functionality under one command with specific flags, like deployment and
> compilation. I just want to guide the discussion towards agreement.
>
> 1. `clean`: rm -rf's any compilation artifacts.
>
> 2. `log`: streams logs (console.log/error/dir) from a running cordova
> application.
> - say you have emulators running and multiple devices connected with
> multiple cordova apps running. Which log do we stream?
>
> 3. `start-emulator` (was `emulate`): kicks up an emulator for the platform.
> - some platforms allow for defining different emulators. How to handle
> this? I.e. Which AVD to pick for android, which simulator for what iOS
> version + model (if this is applicable for iOS), same for windows phone,
> etc.
> - do we want to include Ripple in the list for the above question, or
> split this out into its own? I think I'd prefer `deploy-ripple` personally.
>
> 4. `deploy-device`, `deploy-emulator` (and possibly `deploy-ripple`).
> Deploys a compiled app to the specified target.
> - what if you have multiple devices/emulators running for the specified
> platform?
> - if there are no compiled bits, does this automatically invoke the
> `compile` or `build` command (below)?
> - if you run `deploy-emulator`, but don't have an emulator started, does
> it run `start-emulator` ?
>
> 5. `compile-debug` or `compile-release` (or `build` instead of `compile`).
> Runs the appropriate compilation.
>
> Discuss!
>
>
> On 3/20/13 1:04 PM, "Michael Brooks" <mi...@michaelbrooks.ca> wrote:
>
> >I think this thread is starting to diverge from its purpose and step into
> >the responsibilities of the Cordova CLI.
> >
> >Easy Wins
> >> ---------
> >
> >
> >Fil, I agree with your easy wins. Thanks for summarizing the current state
> >of the platform-specific scripts.
> >
> >It would also be good to have a stubbed implemented of each script on each
> >platform. For example, if a platform does not yet support "log" then it
> >should still have a log script that echo's "logging is unuspported." This
> >allows the Cordova CLI is "shell out" to the scripts without having to
> >check whether the platform has indeed implemented something.
> >
> >Harder Wins
> >> -----------
> >
> >
> >This deserves it's own thread. There seems to be a lot of confusion around
> >the difference between and role of Cordova CLI commands and
> >Platform-specific scripts. Some of the above replies are mixing or
> >interchanging those terms.
> >
> >For platform-specific scripts, I believe a simple and explicit nature is
> >critical. A script must do one thing and only one thing. If we deviate
> >from
> >this, then platform-specific scripts will likely act different for each
> >platform.
> >
> >Michael
> >
> >On Wed, Mar 20, 2013 at 8:59 AM, Ken Wallis <kw...@blackberry.com>
> >wrote:
> >
> >> Deploy vs. Emulate: Deploy could be used to deploy to anything,
> >>emulator,
> >> ripple, simulator, or actual device. I think perhaps deploy is the
> >>right
> >> terminology in this regard than emulate?
> >>
> >> I agree with Jeff that it would be valuable to standardize arguments as
> >> well, in so far as those those that are common across platforms.
> >> --
> >>
> >> Ken Wallis
> >>
> >> Product Manager WebWorks
> >>
> >> BlackBerry
> >>
> >> 289-261-4369
> >>
> >> ________________________________________
> >> From: agrieve@google.com [agrieve@google.com] on behalf of Andrew
> >>Grieve [
> >> agrieve@chromium.org]
> >> Sent: Wednesday, March 20, 2013 11:09 AM
> >> To: dev
> >> Subject: Re: Platform-level command line scripts
> >>
> >> I like the suggestions of having fewer commands. Actually, why not have
> >> just one command? It would make for less copy/paste, and you'd only
> >>have to
> >> use a single --help to see what you can do.
> >>
> >> E.g.:
> >>
> >> ./cordova/cli.js build --profile=release
> >> ./cordova/cli.js build --profile=debug
> >> ./cordova/cli.js clean
> >> ./cordova/cli.js package // For app store
> >> ./cordova/cli.js log
> >> ./cordova/cli.js run --target=DEVICE_ID
> >> ./cordova/cli.js run --target=EMULATOR_ID
> >> ./cordova/cli.js run --target=ripple
> >> ./cordova/cli.js run --target=emulator
> >> ./cordova/cli.js run --target=emulator
> >>
> >>
> >>
> >>
> >>
> >> On Wed, Mar 20, 2013 at 6:19 AM, Brian LeRoux <b...@brian.io> wrote:
> >>
> >> > Fil: yes I like the easy wins you describe.
> >> >
> >> > Anis: agree on harder wins. The `emulate` cmd should require a
> >> > parameter and only launch platform emulators. The `run` cmd should
> >> > default to Ripple, and while we're in there we should kill the serve
> >> > command. Also agree, we should do a download to Fruitstrap from one of
> >> > our forks (to be safe).
> >> >
> >> > Tommy: would be awesome to get your help on the `release` cmd for iOS.
> >> >
> >> > Jesse: agree about cordova-deploy tool should just deploy. (Only I
> >> > think we should rename it to `emulate` and have it require a
> >> > parameter.)
> >> >
> >> > Mapes: we hate the Bruins ok buddy? Get over it. Also: `build` cmd is
> >> > for debug builds and `release` cmd is for doing release builds as you
> >> > intuited. I think you got `run` and `emulate` mixed up but the spirit
> >> > was correct.
> >> >
> >> > Tim/Bryan: can we kick up a fresh thread on the BB10 business? It
> >> > would be nice to get that in but I think those queries got lost in
> >> > this deluge.
> >> >
> >> > Axe! (Parashuram's online crime fighting persona is axemclion): thanks
> >> > for saying hi, we'd love the help yo!
> >> >
> >> >
> >> > On Wed, Mar 20, 2013 at 1:14 AM, Jesse MacFadyen
> >> > <pu...@gmail.com> wrote:
> >> > > Welcome Parashuram!
> >> > > Happy to have some help. Benn has been working on most of this, and
> >>I
> >> > > have created the deploy tools for wp7 and wp8, so reach out if you
> >> > > need guidance or anything.
> >> > >
> >> > > Cheers,
> >> > > Jesse
> >> > >
> >> > > Sent from my iPhone5
> >> > >
> >> > > On 2013-03-19, at 10:24 PM, "Parashuram Narasimhan (MS OPEN TECH)"
> >> > > <pa...@microsoft.com> wrote:
> >> > >
> >> > > Hi,
> >> > >
> >> > > I could offer to start helping on the Windows Phone side of things.
> >> > >
> >> > > P.S: This is my first email to the group, and I think I should
> >> > > introduce myself - I am Parashuram, working for Microsoft Open
> >> > > Technologies Inc.
> >> > >
> >> > > -----Original Message-----
> >> > > From: Filip Maj [mailto:fil@adobe.com]
> >> > > Sent: Tuesday, March 19, 2013 3:42 PM
> >> > > To: dev@cordova.apache.org
> >> > > Subject: Platform-level command line scripts
> >> > >
> >> > > Bringing this up once more, hopefully the last time :)
> >> > >
> >> > > TL;DR: the behavior and naming of the platform-level scripts are
> >>still
> >> > > not 100% lined up. I'd like to fix this and agree with you all on
> >>some
> >> > > of the finer points surrounding this issue.
> >> > >
> >> > > Benn Mapes, an intern at Adobe, has been working on adding Windows
> >> > > Phone support to cordova-cli. It's been a bit of work, but the first
> >> > > step is to land command line scripts at the Windows Phone project
> >> > > level, which he is actively working on. With this happening, I want
> >>to
> >> > > make sure we have our base project-level CLI scripts sorted
> >>properly.
> >> > >
> >> > > Additionally, I've been seeing issues filed against the CLI with
> >> > > essentially users being confused as to why the behavior of "cordova
> >> > > build"
> >> > > vs "cordova emulate" on different platforms is different [1] [2].
> >> > >
> >> > > The answer to all of this is that the project-level scripts have
> >> > > slightly different behavior. I've looked into what each of Android,
> >> > > iOS and BlackBerry (10) do and I've got a basic table sorted out
> >> > > (below). I would like to get to an agreement on naming and behavior
> >> > > for each, and ideally file issues to get as many of our platform
> >> > > implementations as possible to implement/tweak behavior so that we
> >>are
> >> > > consistent on this front.
> >> > >
> >> > > Scripts
> >> > > -------
> >> > >
> >> > > - build
> >> > > - Android: equivalent of running `ant debug`, which simply
> >>compiles
> >> > > your app in debug mode
> >> > > - BB10: packages your app into a zip, runs `bbwp` on it, and
> >> > code-signs it
> >> > > - iOS: runs a compilation with xcodebuild with configuration set
> >>to
> >> > "Debug"
> >> > > - clean
> >> > > - Android: equivalent of running `ant clean`, which removes any
> >> > > build artifacts
> >> > > - BB10: does not exist
> >> > > - iOS: does not exist
> >> > > - log
> >> > > - Android: `adb logcat`
> >> > > - BB10: does not exist
> >> > > - iOS: `tail -f console.log`
> >> > > - release:
> >> > > - Android `ant release`, compiles with your actual signing key
> >> > > - BB10: NOPE
> >> > > - iOS: compiles with xcodebuild with configuration set to
> >>"Release"
> >> > > - run:
> >> > > - Android: runs on EITHER a connected device, or if no device, on
> >>a
> >> > > running emulator, or if no running emulator, launches an emulator
> >>(and
> >> > > if multiple emulator profiles exist, prompts user to pick one), then
> >> > > finally runs the app on it
> >> > > - BB10: asks user if there's a connected device. Then either
> >> > > launches a simulator + loads the app (if user says he/she has no
> >> > > connected device), or attempts runs a debug build of the app on a
> >> > > connected device
> >> > > - iOS: launches an emulator using ios-sim with the app
> >> > > - emulate:
> >> > > - Android: does not exist
> >> > > - BB10: does not exist
> >> > > - iOS: launches an emulator using ios-sim with the app
> >> > >
> >> > > Easy Wins
> >> > > ---------
> >> > >
> >> > > - build: BB10 should change current behaviour so that it doesn't
> >>code
> >> > > sign the package.
> >> > > - clean: add scripts for BB10 and iOS to support this (should be
> >>dead
> >> > simple).
> >> > > - release: BB10 should implement a script that runs a build + a
> >> > > code-sign on the built package.
> >> > >
> >> > > Harder Wins
> >> > > -----------
> >> > >
> >> > > There's confusing behavior with run + emulate commands across
> >> platforms.
> >> > > IMO emulate should handle launching an emulator, and run should
> >>handle
> >> > > deployment, with an extra flag available for run command that
> >> > > specifies the deployment target (device or emulator, perhaps
> >>--device
> >> > > and --emulator). Also not entirely sure how Ripple fits in here but
> >>I
> >> > > would definitely like to see Ripple as the default emulator target.
> >> > >
> >> > > Lots to chew on here but I would highly appreciate some feedback!
> >> > > Renaming some of these commands is on the table too if anyone sees
> >> > > benefit there!
> >> > >
> >> > > [1] https://issues.apache.org/jira/browse/CB-2722
> >> > > [2] https://issues.apache.org/jira/browse/CB-2724
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> This transmission (including any attachments) may contain confidential
> >> information, privileged material (including material protected by the
> >> solicitor-client or other applicable privileges), or constitute
> >>non-public
> >> information. Any use of this information by anyone other than the
> >>intended
> >> recipient is prohibited. If you have received this transmission in
> >>error,
> >> please immediately reply to the sender and delete this information from
> >> your system. Use, dissemination, distribution, or reproduction of this
> >> transmission by unintended recipients is not authorized and may be
> >>unlawful.
> >>
>
>
Re: Platform-level command line scripts
Posted by Filip Maj <fi...@adobe.com>.
Thanks everyone for chiming in, really appreciate this.
I'm of the same opinion as Michael. The current confusion started because
of (arguably) ambiguous terminology used for script names and no explicit
behavior for each listed out. My goal is to arrive at a consensus on the
naming and behavior of various scripts.
The objectives for the scripts should be:
- each script is unambiguously named and does a single, explicit task
(that we formalize in this thread)
- all platforms implement each script, with a default of exiting with
non-zero code and logging out "unsupported" if the implementation is not
possible or not done at this time
Based on everyone's responses, here's my first crack at the scripts (with
questions under each). Also note that I'm open to having some of this
functionality under one command with specific flags, like deployment and
compilation. I just want to guide the discussion towards agreement.
1. `clean`: rm -rf's any compilation artifacts.
2. `log`: streams logs (console.log/error/dir) from a running cordova
application.
- say you have emulators running and multiple devices connected with
multiple cordova apps running. Which log do we stream?
3. `start-emulator` (was `emulate`): kicks up an emulator for the platform.
- some platforms allow for defining different emulators. How to handle
this? I.e. Which AVD to pick for android, which simulator for what iOS
version + model (if this is applicable for iOS), same for windows phone,
etc.
- do we want to include Ripple in the list for the above question, or
split this out into its own? I think I'd prefer `deploy-ripple` personally.
4. `deploy-device`, `deploy-emulator` (and possibly `deploy-ripple`).
Deploys a compiled app to the specified target.
- what if you have multiple devices/emulators running for the specified
platform?
- if there are no compiled bits, does this automatically invoke the
`compile` or `build` command (below)?
- if you run `deploy-emulator`, but don't have an emulator started, does
it run `start-emulator` ?
5. `compile-debug` or `compile-release` (or `build` instead of `compile`).
Runs the appropriate compilation.
Discuss!
On 3/20/13 1:04 PM, "Michael Brooks" <mi...@michaelbrooks.ca> wrote:
>I think this thread is starting to diverge from its purpose and step into
>the responsibilities of the Cordova CLI.
>
>Easy Wins
>> ---------
>
>
>Fil, I agree with your easy wins. Thanks for summarizing the current state
>of the platform-specific scripts.
>
>It would also be good to have a stubbed implemented of each script on each
>platform. For example, if a platform does not yet support "log" then it
>should still have a log script that echo's "logging is unuspported." This
>allows the Cordova CLI is "shell out" to the scripts without having to
>check whether the platform has indeed implemented something.
>
>Harder Wins
>> -----------
>
>
>This deserves it's own thread. There seems to be a lot of confusion around
>the difference between and role of Cordova CLI commands and
>Platform-specific scripts. Some of the above replies are mixing or
>interchanging those terms.
>
>For platform-specific scripts, I believe a simple and explicit nature is
>critical. A script must do one thing and only one thing. If we deviate
>from
>this, then platform-specific scripts will likely act different for each
>platform.
>
>Michael
>
>On Wed, Mar 20, 2013 at 8:59 AM, Ken Wallis <kw...@blackberry.com>
>wrote:
>
>> Deploy vs. Emulate: Deploy could be used to deploy to anything,
>>emulator,
>> ripple, simulator, or actual device. I think perhaps deploy is the
>>right
>> terminology in this regard than emulate?
>>
>> I agree with Jeff that it would be valuable to standardize arguments as
>> well, in so far as those those that are common across platforms.
>> --
>>
>> Ken Wallis
>>
>> Product Manager WebWorks
>>
>> BlackBerry
>>
>> 289-261-4369
>>
>> ________________________________________
>> From: agrieve@google.com [agrieve@google.com] on behalf of Andrew
>>Grieve [
>> agrieve@chromium.org]
>> Sent: Wednesday, March 20, 2013 11:09 AM
>> To: dev
>> Subject: Re: Platform-level command line scripts
>>
>> I like the suggestions of having fewer commands. Actually, why not have
>> just one command? It would make for less copy/paste, and you'd only
>>have to
>> use a single --help to see what you can do.
>>
>> E.g.:
>>
>> ./cordova/cli.js build --profile=release
>> ./cordova/cli.js build --profile=debug
>> ./cordova/cli.js clean
>> ./cordova/cli.js package // For app store
>> ./cordova/cli.js log
>> ./cordova/cli.js run --target=DEVICE_ID
>> ./cordova/cli.js run --target=EMULATOR_ID
>> ./cordova/cli.js run --target=ripple
>> ./cordova/cli.js run --target=emulator
>> ./cordova/cli.js run --target=emulator
>>
>>
>>
>>
>>
>> On Wed, Mar 20, 2013 at 6:19 AM, Brian LeRoux <b...@brian.io> wrote:
>>
>> > Fil: yes I like the easy wins you describe.
>> >
>> > Anis: agree on harder wins. The `emulate` cmd should require a
>> > parameter and only launch platform emulators. The `run` cmd should
>> > default to Ripple, and while we're in there we should kill the serve
>> > command. Also agree, we should do a download to Fruitstrap from one of
>> > our forks (to be safe).
>> >
>> > Tommy: would be awesome to get your help on the `release` cmd for iOS.
>> >
>> > Jesse: agree about cordova-deploy tool should just deploy. (Only I
>> > think we should rename it to `emulate` and have it require a
>> > parameter.)
>> >
>> > Mapes: we hate the Bruins ok buddy? Get over it. Also: `build` cmd is
>> > for debug builds and `release` cmd is for doing release builds as you
>> > intuited. I think you got `run` and `emulate` mixed up but the spirit
>> > was correct.
>> >
>> > Tim/Bryan: can we kick up a fresh thread on the BB10 business? It
>> > would be nice to get that in but I think those queries got lost in
>> > this deluge.
>> >
>> > Axe! (Parashuram's online crime fighting persona is axemclion): thanks
>> > for saying hi, we'd love the help yo!
>> >
>> >
>> > On Wed, Mar 20, 2013 at 1:14 AM, Jesse MacFadyen
>> > <pu...@gmail.com> wrote:
>> > > Welcome Parashuram!
>> > > Happy to have some help. Benn has been working on most of this, and
>>I
>> > > have created the deploy tools for wp7 and wp8, so reach out if you
>> > > need guidance or anything.
>> > >
>> > > Cheers,
>> > > Jesse
>> > >
>> > > Sent from my iPhone5
>> > >
>> > > On 2013-03-19, at 10:24 PM, "Parashuram Narasimhan (MS OPEN TECH)"
>> > > <pa...@microsoft.com> wrote:
>> > >
>> > > Hi,
>> > >
>> > > I could offer to start helping on the Windows Phone side of things.
>> > >
>> > > P.S: This is my first email to the group, and I think I should
>> > > introduce myself - I am Parashuram, working for Microsoft Open
>> > > Technologies Inc.
>> > >
>> > > -----Original Message-----
>> > > From: Filip Maj [mailto:fil@adobe.com]
>> > > Sent: Tuesday, March 19, 2013 3:42 PM
>> > > To: dev@cordova.apache.org
>> > > Subject: Platform-level command line scripts
>> > >
>> > > Bringing this up once more, hopefully the last time :)
>> > >
>> > > TL;DR: the behavior and naming of the platform-level scripts are
>>still
>> > > not 100% lined up. I'd like to fix this and agree with you all on
>>some
>> > > of the finer points surrounding this issue.
>> > >
>> > > Benn Mapes, an intern at Adobe, has been working on adding Windows
>> > > Phone support to cordova-cli. It's been a bit of work, but the first
>> > > step is to land command line scripts at the Windows Phone project
>> > > level, which he is actively working on. With this happening, I want
>>to
>> > > make sure we have our base project-level CLI scripts sorted
>>properly.
>> > >
>> > > Additionally, I've been seeing issues filed against the CLI with
>> > > essentially users being confused as to why the behavior of "cordova
>> > > build"
>> > > vs "cordova emulate" on different platforms is different [1] [2].
>> > >
>> > > The answer to all of this is that the project-level scripts have
>> > > slightly different behavior. I've looked into what each of Android,
>> > > iOS and BlackBerry (10) do and I've got a basic table sorted out
>> > > (below). I would like to get to an agreement on naming and behavior
>> > > for each, and ideally file issues to get as many of our platform
>> > > implementations as possible to implement/tweak behavior so that we
>>are
>> > > consistent on this front.
>> > >
>> > > Scripts
>> > > -------
>> > >
>> > > - build
>> > > - Android: equivalent of running `ant debug`, which simply
>>compiles
>> > > your app in debug mode
>> > > - BB10: packages your app into a zip, runs `bbwp` on it, and
>> > code-signs it
>> > > - iOS: runs a compilation with xcodebuild with configuration set
>>to
>> > "Debug"
>> > > - clean
>> > > - Android: equivalent of running `ant clean`, which removes any
>> > > build artifacts
>> > > - BB10: does not exist
>> > > - iOS: does not exist
>> > > - log
>> > > - Android: `adb logcat`
>> > > - BB10: does not exist
>> > > - iOS: `tail -f console.log`
>> > > - release:
>> > > - Android `ant release`, compiles with your actual signing key
>> > > - BB10: NOPE
>> > > - iOS: compiles with xcodebuild with configuration set to
>>"Release"
>> > > - run:
>> > > - Android: runs on EITHER a connected device, or if no device, on
>>a
>> > > running emulator, or if no running emulator, launches an emulator
>>(and
>> > > if multiple emulator profiles exist, prompts user to pick one), then
>> > > finally runs the app on it
>> > > - BB10: asks user if there's a connected device. Then either
>> > > launches a simulator + loads the app (if user says he/she has no
>> > > connected device), or attempts runs a debug build of the app on a
>> > > connected device
>> > > - iOS: launches an emulator using ios-sim with the app
>> > > - emulate:
>> > > - Android: does not exist
>> > > - BB10: does not exist
>> > > - iOS: launches an emulator using ios-sim with the app
>> > >
>> > > Easy Wins
>> > > ---------
>> > >
>> > > - build: BB10 should change current behaviour so that it doesn't
>>code
>> > > sign the package.
>> > > - clean: add scripts for BB10 and iOS to support this (should be
>>dead
>> > simple).
>> > > - release: BB10 should implement a script that runs a build + a
>> > > code-sign on the built package.
>> > >
>> > > Harder Wins
>> > > -----------
>> > >
>> > > There's confusing behavior with run + emulate commands across
>> platforms.
>> > > IMO emulate should handle launching an emulator, and run should
>>handle
>> > > deployment, with an extra flag available for run command that
>> > > specifies the deployment target (device or emulator, perhaps
>>--device
>> > > and --emulator). Also not entirely sure how Ripple fits in here but
>>I
>> > > would definitely like to see Ripple as the default emulator target.
>> > >
>> > > Lots to chew on here but I would highly appreciate some feedback!
>> > > Renaming some of these commands is on the table too if anyone sees
>> > > benefit there!
>> > >
>> > > [1] https://issues.apache.org/jira/browse/CB-2722
>> > > [2] https://issues.apache.org/jira/browse/CB-2724
>> >
>>
>> ---------------------------------------------------------------------
>> This transmission (including any attachments) may contain confidential
>> information, privileged material (including material protected by the
>> solicitor-client or other applicable privileges), or constitute
>>non-public
>> information. Any use of this information by anyone other than the
>>intended
>> recipient is prohibited. If you have received this transmission in
>>error,
>> please immediately reply to the sender and delete this information from
>> your system. Use, dissemination, distribution, or reproduction of this
>> transmission by unintended recipients is not authorized and may be
>>unlawful.
>>
Re: Platform-level command line scripts
Posted by Michael Brooks <mi...@michaelbrooks.ca>.
I think this thread is starting to diverge from its purpose and step into
the responsibilities of the Cordova CLI.
Easy Wins
> ---------
Fil, I agree with your easy wins. Thanks for summarizing the current state
of the platform-specific scripts.
It would also be good to have a stubbed implemented of each script on each
platform. For example, if a platform does not yet support "log" then it
should still have a log script that echo's "logging is unuspported." This
allows the Cordova CLI is "shell out" to the scripts without having to
check whether the platform has indeed implemented something.
Harder Wins
> -----------
This deserves it's own thread. There seems to be a lot of confusion around
the difference between and role of Cordova CLI commands and
Platform-specific scripts. Some of the above replies are mixing or
interchanging those terms.
For platform-specific scripts, I believe a simple and explicit nature is
critical. A script must do one thing and only one thing. If we deviate from
this, then platform-specific scripts will likely act different for each
platform.
Michael
On Wed, Mar 20, 2013 at 8:59 AM, Ken Wallis <kw...@blackberry.com> wrote:
> Deploy vs. Emulate: Deploy could be used to deploy to anything, emulator,
> ripple, simulator, or actual device. I think perhaps deploy is the right
> terminology in this regard than emulate?
>
> I agree with Jeff that it would be valuable to standardize arguments as
> well, in so far as those those that are common across platforms.
> --
>
> Ken Wallis
>
> Product Manager – WebWorks
>
> BlackBerry
>
> 289-261-4369
>
> ________________________________________
> From: agrieve@google.com [agrieve@google.com] on behalf of Andrew Grieve [
> agrieve@chromium.org]
> Sent: Wednesday, March 20, 2013 11:09 AM
> To: dev
> Subject: Re: Platform-level command line scripts
>
> I like the suggestions of having fewer commands. Actually, why not have
> just one command? It would make for less copy/paste, and you'd only have to
> use a single --help to see what you can do.
>
> E.g.:
>
> ./cordova/cli.js build --profile=release
> ./cordova/cli.js build --profile=debug
> ./cordova/cli.js clean
> ./cordova/cli.js package // For app store
> ./cordova/cli.js log
> ./cordova/cli.js run --target=DEVICE_ID
> ./cordova/cli.js run --target=EMULATOR_ID
> ./cordova/cli.js run --target=ripple
> ./cordova/cli.js run --target=emulator
> ./cordova/cli.js run --target=emulator
>
>
>
>
>
> On Wed, Mar 20, 2013 at 6:19 AM, Brian LeRoux <b...@brian.io> wrote:
>
> > Fil: yes I like the easy wins you describe.
> >
> > Anis: agree on harder wins. The `emulate` cmd should require a
> > parameter and only launch platform emulators. The `run` cmd should
> > default to Ripple, and while we're in there we should kill the serve
> > command. Also agree, we should do a download to Fruitstrap from one of
> > our forks (to be safe).
> >
> > Tommy: would be awesome to get your help on the `release` cmd for iOS.
> >
> > Jesse: agree about cordova-deploy tool should just deploy. (Only I
> > think we should rename it to `emulate` and have it require a
> > parameter.)
> >
> > Mapes: we hate the Bruins ok buddy? Get over it. Also: `build` cmd is
> > for debug builds and `release` cmd is for doing release builds as you
> > intuited. I think you got `run` and `emulate` mixed up but the spirit
> > was correct.
> >
> > Tim/Bryan: can we kick up a fresh thread on the BB10 business? It
> > would be nice to get that in but I think those queries got lost in
> > this deluge.
> >
> > Axe! (Parashuram's online crime fighting persona is axemclion): thanks
> > for saying hi, we'd love the help yo!
> >
> >
> > On Wed, Mar 20, 2013 at 1:14 AM, Jesse MacFadyen
> > <pu...@gmail.com> wrote:
> > > Welcome Parashuram!
> > > Happy to have some help. Benn has been working on most of this, and I
> > > have created the deploy tools for wp7 and wp8, so reach out if you
> > > need guidance or anything.
> > >
> > > Cheers,
> > > Jesse
> > >
> > > Sent from my iPhone5
> > >
> > > On 2013-03-19, at 10:24 PM, "Parashuram Narasimhan (MS OPEN TECH)"
> > > <pa...@microsoft.com> wrote:
> > >
> > > Hi,
> > >
> > > I could offer to start helping on the Windows Phone side of things.
> > >
> > > P.S: This is my first email to the group, and I think I should
> > > introduce myself - I am Parashuram, working for Microsoft Open
> > > Technologies Inc.
> > >
> > > -----Original Message-----
> > > From: Filip Maj [mailto:fil@adobe.com]
> > > Sent: Tuesday, March 19, 2013 3:42 PM
> > > To: dev@cordova.apache.org
> > > Subject: Platform-level command line scripts
> > >
> > > Bringing this up once more, hopefully the last time :)
> > >
> > > TL;DR: the behavior and naming of the platform-level scripts are still
> > > not 100% lined up. I'd like to fix this and agree with you all on some
> > > of the finer points surrounding this issue.
> > >
> > > Benn Mapes, an intern at Adobe, has been working on adding Windows
> > > Phone support to cordova-cli. It's been a bit of work, but the first
> > > step is to land command line scripts at the Windows Phone project
> > > level, which he is actively working on. With this happening, I want to
> > > make sure we have our base project-level CLI scripts sorted properly.
> > >
> > > Additionally, I've been seeing issues filed against the CLI with
> > > essentially users being confused as to why the behavior of "cordova
> > > build"
> > > vs "cordova emulate" on different platforms is different [1] [2].
> > >
> > > The answer to all of this is that the project-level scripts have
> > > slightly different behavior. I've looked into what each of Android,
> > > iOS and BlackBerry (10) do and I've got a basic table sorted out
> > > (below). I would like to get to an agreement on naming and behavior
> > > for each, and ideally file issues to get as many of our platform
> > > implementations as possible to implement/tweak behavior so that we are
> > > consistent on this front.
> > >
> > > Scripts
> > > -------
> > >
> > > - build
> > > - Android: equivalent of running `ant debug`, which simply compiles
> > > your app in debug mode
> > > - BB10: packages your app into a zip, runs `bbwp` on it, and
> > code-signs it
> > > - iOS: runs a compilation with xcodebuild with configuration set to
> > "Debug"
> > > - clean
> > > - Android: equivalent of running `ant clean`, which removes any
> > > build artifacts
> > > - BB10: does not exist
> > > - iOS: does not exist
> > > - log
> > > - Android: `adb logcat`
> > > - BB10: does not exist
> > > - iOS: `tail -f console.log`
> > > - release:
> > > - Android `ant release`, compiles with your actual signing key
> > > - BB10: NOPE
> > > - iOS: compiles with xcodebuild with configuration set to "Release"
> > > - run:
> > > - Android: runs on EITHER a connected device, or if no device, on a
> > > running emulator, or if no running emulator, launches an emulator (and
> > > if multiple emulator profiles exist, prompts user to pick one), then
> > > finally runs the app on it
> > > - BB10: asks user if there's a connected device. Then either
> > > launches a simulator + loads the app (if user says he/she has no
> > > connected device), or attempts runs a debug build of the app on a
> > > connected device
> > > - iOS: launches an emulator using ios-sim with the app
> > > - emulate:
> > > - Android: does not exist
> > > - BB10: does not exist
> > > - iOS: launches an emulator using ios-sim with the app
> > >
> > > Easy Wins
> > > ---------
> > >
> > > - build: BB10 should change current behaviour so that it doesn't code
> > > sign the package.
> > > - clean: add scripts for BB10 and iOS to support this (should be dead
> > simple).
> > > - release: BB10 should implement a script that runs a build + a
> > > code-sign on the built package.
> > >
> > > Harder Wins
> > > -----------
> > >
> > > There's confusing behavior with run + emulate commands across
> platforms.
> > > IMO emulate should handle launching an emulator, and run should handle
> > > deployment, with an extra flag available for run command that
> > > specifies the deployment target (device or emulator, perhaps --device
> > > and --emulator). Also not entirely sure how Ripple fits in here but I
> > > would definitely like to see Ripple as the default emulator target.
> > >
> > > Lots to chew on here but I would highly appreciate some feedback!
> > > Renaming some of these commands is on the table too if anyone sees
> > > benefit there!
> > >
> > > [1] https://issues.apache.org/jira/browse/CB-2722
> > > [2] https://issues.apache.org/jira/browse/CB-2724
> >
>
> ---------------------------------------------------------------------
> This transmission (including any attachments) may contain confidential
> information, privileged material (including material protected by the
> solicitor-client or other applicable privileges), or constitute non-public
> information. Any use of this information by anyone other than the intended
> recipient is prohibited. If you have received this transmission in error,
> please immediately reply to the sender and delete this information from
> your system. Use, dissemination, distribution, or reproduction of this
> transmission by unintended recipients is not authorized and may be unlawful.
>
RE: Platform-level command line scripts
Posted by Ken Wallis <kw...@blackberry.com>.
Deploy vs. Emulate: Deploy could be used to deploy to anything, emulator, ripple, simulator, or actual device. I think perhaps deploy is the right terminology in this regard than emulate?
I agree with Jeff that it would be valuable to standardize arguments as well, in so far as those those that are common across platforms.
--
Ken Wallis
Product Manager – WebWorks
BlackBerry
289-261-4369
________________________________________
From: agrieve@google.com [agrieve@google.com] on behalf of Andrew Grieve [agrieve@chromium.org]
Sent: Wednesday, March 20, 2013 11:09 AM
To: dev
Subject: Re: Platform-level command line scripts
I like the suggestions of having fewer commands. Actually, why not have
just one command? It would make for less copy/paste, and you'd only have to
use a single --help to see what you can do.
E.g.:
./cordova/cli.js build --profile=release
./cordova/cli.js build --profile=debug
./cordova/cli.js clean
./cordova/cli.js package // For app store
./cordova/cli.js log
./cordova/cli.js run --target=DEVICE_ID
./cordova/cli.js run --target=EMULATOR_ID
./cordova/cli.js run --target=ripple
./cordova/cli.js run --target=emulator
./cordova/cli.js run --target=emulator
On Wed, Mar 20, 2013 at 6:19 AM, Brian LeRoux <b...@brian.io> wrote:
> Fil: yes I like the easy wins you describe.
>
> Anis: agree on harder wins. The `emulate` cmd should require a
> parameter and only launch platform emulators. The `run` cmd should
> default to Ripple, and while we're in there we should kill the serve
> command. Also agree, we should do a download to Fruitstrap from one of
> our forks (to be safe).
>
> Tommy: would be awesome to get your help on the `release` cmd for iOS.
>
> Jesse: agree about cordova-deploy tool should just deploy. (Only I
> think we should rename it to `emulate` and have it require a
> parameter.)
>
> Mapes: we hate the Bruins ok buddy? Get over it. Also: `build` cmd is
> for debug builds and `release` cmd is for doing release builds as you
> intuited. I think you got `run` and `emulate` mixed up but the spirit
> was correct.
>
> Tim/Bryan: can we kick up a fresh thread on the BB10 business? It
> would be nice to get that in but I think those queries got lost in
> this deluge.
>
> Axe! (Parashuram's online crime fighting persona is axemclion): thanks
> for saying hi, we'd love the help yo!
>
>
> On Wed, Mar 20, 2013 at 1:14 AM, Jesse MacFadyen
> <pu...@gmail.com> wrote:
> > Welcome Parashuram!
> > Happy to have some help. Benn has been working on most of this, and I
> > have created the deploy tools for wp7 and wp8, so reach out if you
> > need guidance or anything.
> >
> > Cheers,
> > Jesse
> >
> > Sent from my iPhone5
> >
> > On 2013-03-19, at 10:24 PM, "Parashuram Narasimhan (MS OPEN TECH)"
> > <pa...@microsoft.com> wrote:
> >
> > Hi,
> >
> > I could offer to start helping on the Windows Phone side of things.
> >
> > P.S: This is my first email to the group, and I think I should
> > introduce myself - I am Parashuram, working for Microsoft Open
> > Technologies Inc.
> >
> > -----Original Message-----
> > From: Filip Maj [mailto:fil@adobe.com]
> > Sent: Tuesday, March 19, 2013 3:42 PM
> > To: dev@cordova.apache.org
> > Subject: Platform-level command line scripts
> >
> > Bringing this up once more, hopefully the last time :)
> >
> > TL;DR: the behavior and naming of the platform-level scripts are still
> > not 100% lined up. I'd like to fix this and agree with you all on some
> > of the finer points surrounding this issue.
> >
> > Benn Mapes, an intern at Adobe, has been working on adding Windows
> > Phone support to cordova-cli. It's been a bit of work, but the first
> > step is to land command line scripts at the Windows Phone project
> > level, which he is actively working on. With this happening, I want to
> > make sure we have our base project-level CLI scripts sorted properly.
> >
> > Additionally, I've been seeing issues filed against the CLI with
> > essentially users being confused as to why the behavior of "cordova
> > build"
> > vs "cordova emulate" on different platforms is different [1] [2].
> >
> > The answer to all of this is that the project-level scripts have
> > slightly different behavior. I've looked into what each of Android,
> > iOS and BlackBerry (10) do and I've got a basic table sorted out
> > (below). I would like to get to an agreement on naming and behavior
> > for each, and ideally file issues to get as many of our platform
> > implementations as possible to implement/tweak behavior so that we are
> > consistent on this front.
> >
> > Scripts
> > -------
> >
> > - build
> > - Android: equivalent of running `ant debug`, which simply compiles
> > your app in debug mode
> > - BB10: packages your app into a zip, runs `bbwp` on it, and
> code-signs it
> > - iOS: runs a compilation with xcodebuild with configuration set to
> "Debug"
> > - clean
> > - Android: equivalent of running `ant clean`, which removes any
> > build artifacts
> > - BB10: does not exist
> > - iOS: does not exist
> > - log
> > - Android: `adb logcat`
> > - BB10: does not exist
> > - iOS: `tail -f console.log`
> > - release:
> > - Android `ant release`, compiles with your actual signing key
> > - BB10: NOPE
> > - iOS: compiles with xcodebuild with configuration set to "Release"
> > - run:
> > - Android: runs on EITHER a connected device, or if no device, on a
> > running emulator, or if no running emulator, launches an emulator (and
> > if multiple emulator profiles exist, prompts user to pick one), then
> > finally runs the app on it
> > - BB10: asks user if there's a connected device. Then either
> > launches a simulator + loads the app (if user says he/she has no
> > connected device), or attempts runs a debug build of the app on a
> > connected device
> > - iOS: launches an emulator using ios-sim with the app
> > - emulate:
> > - Android: does not exist
> > - BB10: does not exist
> > - iOS: launches an emulator using ios-sim with the app
> >
> > Easy Wins
> > ---------
> >
> > - build: BB10 should change current behaviour so that it doesn't code
> > sign the package.
> > - clean: add scripts for BB10 and iOS to support this (should be dead
> simple).
> > - release: BB10 should implement a script that runs a build + a
> > code-sign on the built package.
> >
> > Harder Wins
> > -----------
> >
> > There's confusing behavior with run + emulate commands across platforms.
> > IMO emulate should handle launching an emulator, and run should handle
> > deployment, with an extra flag available for run command that
> > specifies the deployment target (device or emulator, perhaps --device
> > and --emulator). Also not entirely sure how Ripple fits in here but I
> > would definitely like to see Ripple as the default emulator target.
> >
> > Lots to chew on here but I would highly appreciate some feedback!
> > Renaming some of these commands is on the table too if anyone sees
> > benefit there!
> >
> > [1] https://issues.apache.org/jira/browse/CB-2722
> > [2] https://issues.apache.org/jira/browse/CB-2724
>
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
Re: Platform-level command line scripts
Posted by Andrew Grieve <ag...@chromium.org>.
I like the suggestions of having fewer commands. Actually, why not have
just one command? It would make for less copy/paste, and you'd only have to
use a single --help to see what you can do.
E.g.:
./cordova/cli.js build --profile=release
./cordova/cli.js build --profile=debug
./cordova/cli.js clean
./cordova/cli.js package // For app store
./cordova/cli.js log
./cordova/cli.js run --target=DEVICE_ID
./cordova/cli.js run --target=EMULATOR_ID
./cordova/cli.js run --target=ripple
./cordova/cli.js run --target=emulator
./cordova/cli.js run --target=emulator
On Wed, Mar 20, 2013 at 6:19 AM, Brian LeRoux <b...@brian.io> wrote:
> Fil: yes I like the easy wins you describe.
>
> Anis: agree on harder wins. The `emulate` cmd should require a
> parameter and only launch platform emulators. The `run` cmd should
> default to Ripple, and while we're in there we should kill the serve
> command. Also agree, we should do a download to Fruitstrap from one of
> our forks (to be safe).
>
> Tommy: would be awesome to get your help on the `release` cmd for iOS.
>
> Jesse: agree about cordova-deploy tool should just deploy. (Only I
> think we should rename it to `emulate` and have it require a
> parameter.)
>
> Mapes: we hate the Bruins ok buddy? Get over it. Also: `build` cmd is
> for debug builds and `release` cmd is for doing release builds as you
> intuited. I think you got `run` and `emulate` mixed up but the spirit
> was correct.
>
> Tim/Bryan: can we kick up a fresh thread on the BB10 business? It
> would be nice to get that in but I think those queries got lost in
> this deluge.
>
> Axe! (Parashuram's online crime fighting persona is axemclion): thanks
> for saying hi, we'd love the help yo!
>
>
> On Wed, Mar 20, 2013 at 1:14 AM, Jesse MacFadyen
> <pu...@gmail.com> wrote:
> > Welcome Parashuram!
> > Happy to have some help. Benn has been working on most of this, and I
> > have created the deploy tools for wp7 and wp8, so reach out if you
> > need guidance or anything.
> >
> > Cheers,
> > Jesse
> >
> > Sent from my iPhone5
> >
> > On 2013-03-19, at 10:24 PM, "Parashuram Narasimhan (MS OPEN TECH)"
> > <pa...@microsoft.com> wrote:
> >
> > Hi,
> >
> > I could offer to start helping on the Windows Phone side of things.
> >
> > P.S: This is my first email to the group, and I think I should
> > introduce myself - I am Parashuram, working for Microsoft Open
> > Technologies Inc.
> >
> > -----Original Message-----
> > From: Filip Maj [mailto:fil@adobe.com]
> > Sent: Tuesday, March 19, 2013 3:42 PM
> > To: dev@cordova.apache.org
> > Subject: Platform-level command line scripts
> >
> > Bringing this up once more, hopefully the last time :)
> >
> > TL;DR: the behavior and naming of the platform-level scripts are still
> > not 100% lined up. I'd like to fix this and agree with you all on some
> > of the finer points surrounding this issue.
> >
> > Benn Mapes, an intern at Adobe, has been working on adding Windows
> > Phone support to cordova-cli. It's been a bit of work, but the first
> > step is to land command line scripts at the Windows Phone project
> > level, which he is actively working on. With this happening, I want to
> > make sure we have our base project-level CLI scripts sorted properly.
> >
> > Additionally, I've been seeing issues filed against the CLI with
> > essentially users being confused as to why the behavior of "cordova
> > build"
> > vs "cordova emulate" on different platforms is different [1] [2].
> >
> > The answer to all of this is that the project-level scripts have
> > slightly different behavior. I've looked into what each of Android,
> > iOS and BlackBerry (10) do and I've got a basic table sorted out
> > (below). I would like to get to an agreement on naming and behavior
> > for each, and ideally file issues to get as many of our platform
> > implementations as possible to implement/tweak behavior so that we are
> > consistent on this front.
> >
> > Scripts
> > -------
> >
> > - build
> > - Android: equivalent of running `ant debug`, which simply compiles
> > your app in debug mode
> > - BB10: packages your app into a zip, runs `bbwp` on it, and
> code-signs it
> > - iOS: runs a compilation with xcodebuild with configuration set to
> "Debug"
> > - clean
> > - Android: equivalent of running `ant clean`, which removes any
> > build artifacts
> > - BB10: does not exist
> > - iOS: does not exist
> > - log
> > - Android: `adb logcat`
> > - BB10: does not exist
> > - iOS: `tail -f console.log`
> > - release:
> > - Android `ant release`, compiles with your actual signing key
> > - BB10: NOPE
> > - iOS: compiles with xcodebuild with configuration set to "Release"
> > - run:
> > - Android: runs on EITHER a connected device, or if no device, on a
> > running emulator, or if no running emulator, launches an emulator (and
> > if multiple emulator profiles exist, prompts user to pick one), then
> > finally runs the app on it
> > - BB10: asks user if there's a connected device. Then either
> > launches a simulator + loads the app (if user says he/she has no
> > connected device), or attempts runs a debug build of the app on a
> > connected device
> > - iOS: launches an emulator using ios-sim with the app
> > - emulate:
> > - Android: does not exist
> > - BB10: does not exist
> > - iOS: launches an emulator using ios-sim with the app
> >
> > Easy Wins
> > ---------
> >
> > - build: BB10 should change current behaviour so that it doesn't code
> > sign the package.
> > - clean: add scripts for BB10 and iOS to support this (should be dead
> simple).
> > - release: BB10 should implement a script that runs a build + a
> > code-sign on the built package.
> >
> > Harder Wins
> > -----------
> >
> > There's confusing behavior with run + emulate commands across platforms.
> > IMO emulate should handle launching an emulator, and run should handle
> > deployment, with an extra flag available for run command that
> > specifies the deployment target (device or emulator, perhaps --device
> > and --emulator). Also not entirely sure how Ripple fits in here but I
> > would definitely like to see Ripple as the default emulator target.
> >
> > Lots to chew on here but I would highly appreciate some feedback!
> > Renaming some of these commands is on the table too if anyone sees
> > benefit there!
> >
> > [1] https://issues.apache.org/jira/browse/CB-2722
> > [2] https://issues.apache.org/jira/browse/CB-2724
>
Re: Platform-level command line scripts
Posted by Brian LeRoux <b...@brian.io>.
Fil: yes I like the easy wins you describe.
Anis: agree on harder wins. The `emulate` cmd should require a
parameter and only launch platform emulators. The `run` cmd should
default to Ripple, and while we're in there we should kill the serve
command. Also agree, we should do a download to Fruitstrap from one of
our forks (to be safe).
Tommy: would be awesome to get your help on the `release` cmd for iOS.
Jesse: agree about cordova-deploy tool should just deploy. (Only I
think we should rename it to `emulate` and have it require a
parameter.)
Mapes: we hate the Bruins ok buddy? Get over it. Also: `build` cmd is
for debug builds and `release` cmd is for doing release builds as you
intuited. I think you got `run` and `emulate` mixed up but the spirit
was correct.
Tim/Bryan: can we kick up a fresh thread on the BB10 business? It
would be nice to get that in but I think those queries got lost in
this deluge.
Axe! (Parashuram's online crime fighting persona is axemclion): thanks
for saying hi, we'd love the help yo!
On Wed, Mar 20, 2013 at 1:14 AM, Jesse MacFadyen
<pu...@gmail.com> wrote:
> Welcome Parashuram!
> Happy to have some help. Benn has been working on most of this, and I
> have created the deploy tools for wp7 and wp8, so reach out if you
> need guidance or anything.
>
> Cheers,
> Jesse
>
> Sent from my iPhone5
>
> On 2013-03-19, at 10:24 PM, "Parashuram Narasimhan (MS OPEN TECH)"
> <pa...@microsoft.com> wrote:
>
> Hi,
>
> I could offer to start helping on the Windows Phone side of things.
>
> P.S: This is my first email to the group, and I think I should
> introduce myself - I am Parashuram, working for Microsoft Open
> Technologies Inc.
>
> -----Original Message-----
> From: Filip Maj [mailto:fil@adobe.com]
> Sent: Tuesday, March 19, 2013 3:42 PM
> To: dev@cordova.apache.org
> Subject: Platform-level command line scripts
>
> Bringing this up once more, hopefully the last time :)
>
> TL;DR: the behavior and naming of the platform-level scripts are still
> not 100% lined up. I'd like to fix this and agree with you all on some
> of the finer points surrounding this issue.
>
> Benn Mapes, an intern at Adobe, has been working on adding Windows
> Phone support to cordova-cli. It's been a bit of work, but the first
> step is to land command line scripts at the Windows Phone project
> level, which he is actively working on. With this happening, I want to
> make sure we have our base project-level CLI scripts sorted properly.
>
> Additionally, I've been seeing issues filed against the CLI with
> essentially users being confused as to why the behavior of "cordova
> build"
> vs "cordova emulate" on different platforms is different [1] [2].
>
> The answer to all of this is that the project-level scripts have
> slightly different behavior. I've looked into what each of Android,
> iOS and BlackBerry (10) do and I've got a basic table sorted out
> (below). I would like to get to an agreement on naming and behavior
> for each, and ideally file issues to get as many of our platform
> implementations as possible to implement/tweak behavior so that we are
> consistent on this front.
>
> Scripts
> -------
>
> - build
> - Android: equivalent of running `ant debug`, which simply compiles
> your app in debug mode
> - BB10: packages your app into a zip, runs `bbwp` on it, and code-signs it
> - iOS: runs a compilation with xcodebuild with configuration set to "Debug"
> - clean
> - Android: equivalent of running `ant clean`, which removes any
> build artifacts
> - BB10: does not exist
> - iOS: does not exist
> - log
> - Android: `adb logcat`
> - BB10: does not exist
> - iOS: `tail -f console.log`
> - release:
> - Android `ant release`, compiles with your actual signing key
> - BB10: NOPE
> - iOS: compiles with xcodebuild with configuration set to "Release"
> - run:
> - Android: runs on EITHER a connected device, or if no device, on a
> running emulator, or if no running emulator, launches an emulator (and
> if multiple emulator profiles exist, prompts user to pick one), then
> finally runs the app on it
> - BB10: asks user if there's a connected device. Then either
> launches a simulator + loads the app (if user says he/she has no
> connected device), or attempts runs a debug build of the app on a
> connected device
> - iOS: launches an emulator using ios-sim with the app
> - emulate:
> - Android: does not exist
> - BB10: does not exist
> - iOS: launches an emulator using ios-sim with the app
>
> Easy Wins
> ---------
>
> - build: BB10 should change current behaviour so that it doesn't code
> sign the package.
> - clean: add scripts for BB10 and iOS to support this (should be dead simple).
> - release: BB10 should implement a script that runs a build + a
> code-sign on the built package.
>
> Harder Wins
> -----------
>
> There's confusing behavior with run + emulate commands across platforms.
> IMO emulate should handle launching an emulator, and run should handle
> deployment, with an extra flag available for run command that
> specifies the deployment target (device or emulator, perhaps --device
> and --emulator). Also not entirely sure how Ripple fits in here but I
> would definitely like to see Ripple as the default emulator target.
>
> Lots to chew on here but I would highly appreciate some feedback!
> Renaming some of these commands is on the table too if anyone sees
> benefit there!
>
> [1] https://issues.apache.org/jira/browse/CB-2722
> [2] https://issues.apache.org/jira/browse/CB-2724
Re: Platform-level command line scripts
Posted by Jesse MacFadyen <pu...@gmail.com>.
Welcome Parashuram!
Happy to have some help. Benn has been working on most of this, and I
have created the deploy tools for wp7 and wp8, so reach out if you
need guidance or anything.
Cheers,
Jesse
Sent from my iPhone5
On 2013-03-19, at 10:24 PM, "Parashuram Narasimhan (MS OPEN TECH)"
<pa...@microsoft.com> wrote:
Hi,
I could offer to start helping on the Windows Phone side of things.
P.S: This is my first email to the group, and I think I should
introduce myself - I am Parashuram, working for Microsoft Open
Technologies Inc.
-----Original Message-----
From: Filip Maj [mailto:fil@adobe.com]
Sent: Tuesday, March 19, 2013 3:42 PM
To: dev@cordova.apache.org
Subject: Platform-level command line scripts
Bringing this up once more, hopefully the last time :)
TL;DR: the behavior and naming of the platform-level scripts are still
not 100% lined up. I'd like to fix this and agree with you all on some
of the finer points surrounding this issue.
Benn Mapes, an intern at Adobe, has been working on adding Windows
Phone support to cordova-cli. It's been a bit of work, but the first
step is to land command line scripts at the Windows Phone project
level, which he is actively working on. With this happening, I want to
make sure we have our base project-level CLI scripts sorted properly.
Additionally, I've been seeing issues filed against the CLI with
essentially users being confused as to why the behavior of "cordova
build"
vs "cordova emulate" on different platforms is different [1] [2].
The answer to all of this is that the project-level scripts have
slightly different behavior. I've looked into what each of Android,
iOS and BlackBerry (10) do and I've got a basic table sorted out
(below). I would like to get to an agreement on naming and behavior
for each, and ideally file issues to get as many of our platform
implementations as possible to implement/tweak behavior so that we are
consistent on this front.
Scripts
-------
- build
- Android: equivalent of running `ant debug`, which simply compiles
your app in debug mode
- BB10: packages your app into a zip, runs `bbwp` on it, and code-signs it
- iOS: runs a compilation with xcodebuild with configuration set to "Debug"
- clean
- Android: equivalent of running `ant clean`, which removes any
build artifacts
- BB10: does not exist
- iOS: does not exist
- log
- Android: `adb logcat`
- BB10: does not exist
- iOS: `tail -f console.log`
- release:
- Android `ant release`, compiles with your actual signing key
- BB10: NOPE
- iOS: compiles with xcodebuild with configuration set to "Release"
- run:
- Android: runs on EITHER a connected device, or if no device, on a
running emulator, or if no running emulator, launches an emulator (and
if multiple emulator profiles exist, prompts user to pick one), then
finally runs the app on it
- BB10: asks user if there's a connected device. Then either
launches a simulator + loads the app (if user says he/she has no
connected device), or attempts runs a debug build of the app on a
connected device
- iOS: launches an emulator using ios-sim with the app
- emulate:
- Android: does not exist
- BB10: does not exist
- iOS: launches an emulator using ios-sim with the app
Easy Wins
---------
- build: BB10 should change current behaviour so that it doesn't code
sign the package.
- clean: add scripts for BB10 and iOS to support this (should be dead simple).
- release: BB10 should implement a script that runs a build + a
code-sign on the built package.
Harder Wins
-----------
There's confusing behavior with run + emulate commands across platforms.
IMO emulate should handle launching an emulator, and run should handle
deployment, with an extra flag available for run command that
specifies the deployment target (device or emulator, perhaps --device
and --emulator). Also not entirely sure how Ripple fits in here but I
would definitely like to see Ripple as the default emulator target.
Lots to chew on here but I would highly appreciate some feedback!
Renaming some of these commands is on the table too if anyone sees
benefit there!
[1] https://issues.apache.org/jira/browse/CB-2722
[2] https://issues.apache.org/jira/browse/CB-2724
RE: Platform-level command line scripts
Posted by "Parashuram Narasimhan (MS OPEN TECH)" <pa...@microsoft.com>.
Hi,
I could offer to start helping on the Windows Phone side of things.
P.S: This is my first email to the group, and I think I should introduce myself - I am Parashuram, working for Microsoft Open Technologies Inc.
-----Original Message-----
From: Filip Maj [mailto:fil@adobe.com]
Sent: Tuesday, March 19, 2013 3:42 PM
To: dev@cordova.apache.org
Subject: Platform-level command line scripts
Bringing this up once more, hopefully the last time :)
TL;DR: the behavior and naming of the platform-level scripts are still not 100% lined up. I'd like to fix this and agree with you all on some of the finer points surrounding this issue.
Benn Mapes, an intern at Adobe, has been working on adding Windows Phone support to cordova-cli. It's been a bit of work, but the first step is to land command line scripts at the Windows Phone project level, which he is actively working on. With this happening, I want to make sure we have our base project-level CLI scripts sorted properly.
Additionally, I've been seeing issues filed against the CLI with essentially users being confused as to why the behavior of "cordova build"
vs "cordova emulate" on different platforms is different [1] [2].
The answer to all of this is that the project-level scripts have slightly different behavior. I've looked into what each of Android, iOS and BlackBerry (10) do and I've got a basic table sorted out (below). I would like to get to an agreement on naming and behavior for each, and ideally file issues to get as many of our platform implementations as possible to implement/tweak behavior so that we are consistent on this front.
Scripts
-------
- build
- Android: equivalent of running `ant debug`, which simply compiles your app in debug mode
- BB10: packages your app into a zip, runs `bbwp` on it, and code-signs it
- iOS: runs a compilation with xcodebuild with configuration set to "Debug"
- clean
- Android: equivalent of running `ant clean`, which removes any build artifacts
- BB10: does not exist
- iOS: does not exist
- log
- Android: `adb logcat`
- BB10: does not exist
- iOS: `tail -f console.log`
- release:
- Android `ant release`, compiles with your actual signing key
- BB10: NOPE
- iOS: compiles with xcodebuild with configuration set to "Release"
- run:
- Android: runs on EITHER a connected device, or if no device, on a running emulator, or if no running emulator, launches an emulator (and if multiple emulator profiles exist, prompts user to pick one), then finally runs the app on it
- BB10: asks user if there's a connected device. Then either launches a simulator + loads the app (if user says he/she has no connected device), or attempts runs a debug build of the app on a connected device
- iOS: launches an emulator using ios-sim with the app
- emulate:
- Android: does not exist
- BB10: does not exist
- iOS: launches an emulator using ios-sim with the app
Easy Wins
---------
- build: BB10 should change current behaviour so that it doesn't code sign the package.
- clean: add scripts for BB10 and iOS to support this (should be dead simple).
- release: BB10 should implement a script that runs a build + a code-sign on the built package.
Harder Wins
-----------
There's confusing behavior with run + emulate commands across platforms.
IMO emulate should handle launching an emulator, and run should handle deployment, with an extra flag available for run command that specifies the deployment target (device or emulator, perhaps --device and --emulator). Also not entirely sure how Ripple fits in here but I would definitely like to see Ripple as the default emulator target.
Lots to chew on here but I would highly appreciate some feedback! Renaming some of these commands is on the table too if anyone sees benefit there!
[1] https://issues.apache.org/jira/browse/CB-2722
[2] https://issues.apache.org/jira/browse/CB-2724
Re: Platform-level command line scripts
Posted by Filip Maj <fi...@adobe.com>.
The easy thing to do is download fruitstrap at runtime in the iOS
implementation, just like android + blackberry do for commons-codec and
any other required libs that we can't "ship" with cordova.
I still see value in having an emulate command that will RUN an emulator.
I would like to hear more opinions before we figure out tasks.
On 3/19/13 4:39 PM, "Tommy-Carlos Williams" <to...@devgeeks.org> wrote:
>I would also like to see iOS's "release" script changed.
>
>Currently (as Fil said below) it compiles with the profile set to
>"Release". However, since it is still building targeting x86 (i.e.: the
>iOS Sim, not a device) it is inconsistent with say the Android "release"
>script that actually gets you a code signed non-debug APK.
>
>I would like to see "release" on iOS at the very least have a flag
>allowing you to set the arch (say armv7 vs x86) and at the best
>generating an ad hoc ready .ipa with the correct arch.
>
>I know there has been no communication from the Fruitstrap guy, so we are
>still at a bit of an impasse wrt having the tooling load the project onto
>a device, but the "release" script for iOS should at least do something
>comparable or even useful. An iOS Sim build with your "Release" profile
>is next to useless, really (unless I am missing something).
>
>Š and yesŠ this is me putting my hand up to do it if there is consensus /
>interest.
>
>- tommy
>
>On 20/03/2013, at 9:42 AM, Filip Maj <fi...@adobe.com> wrote:
>
>> Bringing this up once more, hopefully the last time :)
>>
>> TL;DR: the behavior and naming of the platform-level scripts are still
>>not
>> 100% lined up. I'd like to fix this and agree with you all on some of
>>the
>> finer points surrounding this issue.
>>
>> Benn Mapes, an intern at Adobe, has been working on adding Windows Phone
>> support to cordova-cli. It's been a bit of work, but the first step is
>>to
>> land command line scripts at the Windows Phone project level, which he
>>is
>> actively working on. With this happening, I want to make sure we have
>>our
>> base project-level CLI scripts sorted properly.
>>
>> Additionally, I've been seeing issues filed against the CLI with
>> essentially users being confused as to why the behavior of "cordova
>>build"
>> vs "cordova emulate" on different platforms is different [1] [2].
>>
>> The answer to all of this is that the project-level scripts have
>>slightly
>> different behavior. I've looked into what each of Android, iOS and
>> BlackBerry (10) do and I've got a basic table sorted out (below). I
>>would
>> like to get to an agreement on naming and behavior for each, and ideally
>> file issues to get as many of our platform implementations as possible
>>to
>> implement/tweak behavior so that we are consistent on this front.
>>
>> Scripts
>> -------
>>
>> - build
>> - Android: equivalent of running `ant debug`, which simply compiles
>> your app in debug mode
>> - BB10: packages your app into a zip, runs `bbwp` on it, and
>>code-signs
>> it
>> - iOS: runs a compilation with xcodebuild with configuration set to
>> "Debug"
>> - clean
>> - Android: equivalent of running `ant clean`, which removes any build
>> artifacts
>> - BB10: does not exist
>> - iOS: does not exist
>> - log
>> - Android: `adb logcat`
>> - BB10: does not exist
>> - iOS: `tail -f console.log`
>> - release:
>> - Android `ant release`, compiles with your actual signing key
>> - BB10: NOPE
>> - iOS: compiles with xcodebuild with configuration set to "Release"
>> - run:
>> - Android: runs on EITHER a connected device, or if no device, on a
>> running emulator, or if no running emulator, launches an emulator (and
>>if
>> multiple emulator profiles exist, prompts user to pick one), then
>>finally
>> runs the app on it
>> - BB10: asks user if there's a connected device. Then either launches
>>a
>> simulator + loads the app (if user says he/she has no connected device),
>> or attempts runs a debug build of the app on a connected device
>> - iOS: launches an emulator using ios-sim with the app
>> - emulate:
>> - Android: does not exist
>> - BB10: does not exist
>> - iOS: launches an emulator using ios-sim with the app
>>
>> Easy Wins
>> ---------
>>
>> - build: BB10 should change current behaviour so that it doesn't code
>> sign the package.
>> - clean: add scripts for BB10 and iOS to support this (should be dead
>> simple).
>> - release: BB10 should implement a script that runs a build + a
>>code-sign
>> on the built package.
>>
>> Harder Wins
>> -----------
>>
>> There's confusing behavior with run + emulate commands across platforms.
>> IMO emulate should handle launching an emulator, and run should handle
>> deployment, with an extra flag available for run command that specifies
>> the deployment target (device or emulator, perhaps --device and
>> --emulator). Also not entirely sure how Ripple fits in here but I would
>> definitely like to see Ripple as the default emulator target.
>>
>> Lots to chew on here but I would highly appreciate some feedback!
>>Renaming
>> some of these commands is on the table too if anyone sees benefit there!
>>
>> [1] https://issues.apache.org/jira/browse/CB-2722
>> [2] https://issues.apache.org/jira/browse/CB-2724
>>
>
Re: Platform-level command line scripts
Posted by Tommy-Carlos Williams <to...@devgeeks.org>.
I would also like to see iOS's "release" script changed.
Currently (as Fil said below) it compiles with the profile set to "Release". However, since it is still building targeting x86 (i.e.: the iOS Sim, not a device) it is inconsistent with say the Android "release" script that actually gets you a code signed non-debug APK.
I would like to see "release" on iOS at the very least have a flag allowing you to set the arch (say armv7 vs x86) and at the best generating an ad hoc ready .ipa with the correct arch.
I know there has been no communication from the Fruitstrap guy, so we are still at a bit of an impasse wrt having the tooling load the project onto a device, but the "release" script for iOS should at least do something comparable or even useful. An iOS Sim build with your "Release" profile is next to useless, really (unless I am missing something).
… and yes… this is me putting my hand up to do it if there is consensus / interest.
- tommy
On 20/03/2013, at 9:42 AM, Filip Maj <fi...@adobe.com> wrote:
> Bringing this up once more, hopefully the last time :)
>
> TL;DR: the behavior and naming of the platform-level scripts are still not
> 100% lined up. I'd like to fix this and agree with you all on some of the
> finer points surrounding this issue.
>
> Benn Mapes, an intern at Adobe, has been working on adding Windows Phone
> support to cordova-cli. It's been a bit of work, but the first step is to
> land command line scripts at the Windows Phone project level, which he is
> actively working on. With this happening, I want to make sure we have our
> base project-level CLI scripts sorted properly.
>
> Additionally, I've been seeing issues filed against the CLI with
> essentially users being confused as to why the behavior of "cordova build"
> vs "cordova emulate" on different platforms is different [1] [2].
>
> The answer to all of this is that the project-level scripts have slightly
> different behavior. I've looked into what each of Android, iOS and
> BlackBerry (10) do and I've got a basic table sorted out (below). I would
> like to get to an agreement on naming and behavior for each, and ideally
> file issues to get as many of our platform implementations as possible to
> implement/tweak behavior so that we are consistent on this front.
>
> Scripts
> -------
>
> - build
> - Android: equivalent of running `ant debug`, which simply compiles
> your app in debug mode
> - BB10: packages your app into a zip, runs `bbwp` on it, and code-signs
> it
> - iOS: runs a compilation with xcodebuild with configuration set to
> "Debug"
> - clean
> - Android: equivalent of running `ant clean`, which removes any build
> artifacts
> - BB10: does not exist
> - iOS: does not exist
> - log
> - Android: `adb logcat`
> - BB10: does not exist
> - iOS: `tail -f console.log`
> - release:
> - Android `ant release`, compiles with your actual signing key
> - BB10: NOPE
> - iOS: compiles with xcodebuild with configuration set to "Release"
> - run:
> - Android: runs on EITHER a connected device, or if no device, on a
> running emulator, or if no running emulator, launches an emulator (and if
> multiple emulator profiles exist, prompts user to pick one), then finally
> runs the app on it
> - BB10: asks user if there's a connected device. Then either launches a
> simulator + loads the app (if user says he/she has no connected device),
> or attempts runs a debug build of the app on a connected device
> - iOS: launches an emulator using ios-sim with the app
> - emulate:
> - Android: does not exist
> - BB10: does not exist
> - iOS: launches an emulator using ios-sim with the app
>
> Easy Wins
> ---------
>
> - build: BB10 should change current behaviour so that it doesn't code
> sign the package.
> - clean: add scripts for BB10 and iOS to support this (should be dead
> simple).
> - release: BB10 should implement a script that runs a build + a code-sign
> on the built package.
>
> Harder Wins
> -----------
>
> There's confusing behavior with run + emulate commands across platforms.
> IMO emulate should handle launching an emulator, and run should handle
> deployment, with an extra flag available for run command that specifies
> the deployment target (device or emulator, perhaps --device and
> --emulator). Also not entirely sure how Ripple fits in here but I would
> definitely like to see Ripple as the default emulator target.
>
> Lots to chew on here but I would highly appreciate some feedback! Renaming
> some of these commands is on the table too if anyone sees benefit there!
>
> [1] https://issues.apache.org/jira/browse/CB-2722
> [2] https://issues.apache.org/jira/browse/CB-2724
>
Re: Platform-level command line scripts
Posted by Bryan Higgins <br...@bryanhiggins.net>.
We've been looking into the platform scripts for BB recently. Hopefully
I'll have some code to share soon.
Here is what we are thinking:
- build - should create and deploy debug token by default rather than
signing. We'd also like this to compile any native plugins.
- release - just calls build with a release flag which code signs
- clean - remove the generated files
- run - deploys to device or simulator which is pre-configured
- * target * - this would be an additional script to add/remove devices for
the run command
- log - I believe the blackberry-deploy tool can pull down the BB10 app
logs. I'll double check that tomorrow.
Questions:
- Am I safe in my assumption that all platforms may define parameters
differently as long as default actions are the same?
- Should the build script call run after successful build as it does now?
Thanks,
Bryan
On Tue, Mar 19, 2013 at 8:43 PM, Tim Kim <ti...@gmail.com> wrote:
> I agree with the BlackBerry scripts must do. Most of the BlackBerry stuff
> should be pretty simple. If you took all the existing ant commands and
> what's in the cordova scripts already, you're most of the way there.
>
> However, I'm not sure what log would look like. I think there's a way to
> ssh your way into the BB10 and get access to the device log which could be
> pretty useful. However, I haven't been able to do it on my dev alpha (was
> locked out via file permissions), but maybe the z10 is able to???
>
>
> On 19 March 2013 17:25, Benn Mapes <be...@gmail.com> wrote:
>
> > Ok just to get this straight, we would like to see these scripts in the
> > cordova directory of a Cordova project.
> >
> > *build* - compiles the project so that it can be deployed (possible flags
> > are debug and release?)
> >
> > *clean* - removes all generated files (are these just the project
> specific
> > files or the ones generated for the platform as well, i.e
> CordovaDeploy.exe
> > for windows)
> >
> > *log *- logs device output (not supported yet for windows)
> >
> > *release* - Is this just the equivalent of `build` but in release mode?
> > maybe you can just make this a flag in the build script?
> >
> > *run *- This would handle deploying the already built application to a
> > device or emulator of the users choosing (do we want to prompt for this
> or
> > use flags to decide?)
> >
> > *emulate* - I like jesse's suggestion that this should be used for
> *ripple
> > only*
> > *
> > *
> > Cheers,
> > ~Benn
> >
> >
> > On Tue, Mar 19, 2013 at 4:48 PM, Jesse <pu...@gmail.com> wrote:
> >
> > > I agree with Anis, and your easy wins Fil!
> > >
> > > emulate is confusing, unless emulate is 'ripple only!'
> > >
> > > I think run should take a parameter which specifies where it should
> run,
> > > defaulting to an attached device perhaps.
> > >
> > > The cordova-deploy tool for Windows Phone 8 and Windows Phone 7 ( same
> > API,
> > > different implementations/requirements/libraries ) has a simple
> interface
> > > where you can call it with -devices and it will simply list targets [1]
> > >
> > >
> > > In this case, the deploy tool is not going to build anything, as it is
> > > specifically *just* a deploy tool, but ultimately on WP7+8 this is what
> > the
> > > cl tools will use anyway.
> > > An approach like this allows you to target multiple emulators ( WP8
> has 7
> > > different emulators )
> > >
> > >
> > > [1]
> > >
> > >
> >
> https://github.com/purplecabbage/cordova-wp8/blob/master/tooling/CordovaDeploy/CordovaDeploy/Program.cs#L45
> > >
> > > @purplecabbage
> > > risingj.com
> > >
> > >
> > > On Tue, Mar 19, 2013 at 4:32 PM, Anis KADRI <an...@gmail.com>
> > wrote:
> > >
> > > > I agree with your easy wins.
> > > >
> > > > As for the 'emulate' command I don't think it should exist and should
> > be
> > > > replaced with 'run'. I thought we agreed on it in a previous thread.
> I
> > > > believe the way Android does it is the way to go.
> > > >
> > > > The issue is to get it to work on iOS with Fruitstrap. Obviously we
> > can't
> > > > ship FruitStrap with Cordova but we can script it to download it when
> > we
> > > > use the "run" command.
> > > >
> > > > Don't know anything about BlackBerry but I want to say that there
> > should
> > > be
> > > > a way to detected connected devices without prompting the user, yes ?
> > > >
> > > > -a
> > > >
> > > >
> > > > On Tue, Mar 19, 2013 at 3:42 PM, Filip Maj <fi...@adobe.com> wrote:
> > > >
> > > > > Bringing this up once more, hopefully the last time :)
> > > > >
> > > > > TL;DR: the behavior and naming of the platform-level scripts are
> > still
> > > > not
> > > > > 100% lined up. I'd like to fix this and agree with you all on some
> of
> > > the
> > > > > finer points surrounding this issue.
> > > > >
> > > > > Benn Mapes, an intern at Adobe, has been working on adding Windows
> > > Phone
> > > > > support to cordova-cli. It's been a bit of work, but the first step
> > is
> > > to
> > > > > land command line scripts at the Windows Phone project level, which
> > he
> > > is
> > > > > actively working on. With this happening, I want to make sure we
> have
> > > our
> > > > > base project-level CLI scripts sorted properly.
> > > > >
> > > > > Additionally, I've been seeing issues filed against the CLI with
> > > > > essentially users being confused as to why the behavior of "cordova
> > > > build"
> > > > > vs "cordova emulate" on different platforms is different [1] [2].
> > > > >
> > > > > The answer to all of this is that the project-level scripts have
> > > slightly
> > > > > different behavior. I've looked into what each of Android, iOS and
> > > > > BlackBerry (10) do and I've got a basic table sorted out (below). I
> > > would
> > > > > like to get to an agreement on naming and behavior for each, and
> > > ideally
> > > > > file issues to get as many of our platform implementations as
> > possible
> > > to
> > > > > implement/tweak behavior so that we are consistent on this front.
> > > > >
> > > > > Scripts
> > > > > -------
> > > > >
> > > > > - build
> > > > > - Android: equivalent of running `ant debug`, which simply
> > compiles
> > > > > your app in debug mode
> > > > > - BB10: packages your app into a zip, runs `bbwp` on it, and
> > > > code-signs
> > > > > it
> > > > > - iOS: runs a compilation with xcodebuild with configuration set
> > to
> > > > > "Debug"
> > > > > - clean
> > > > > - Android: equivalent of running `ant clean`, which removes any
> > > build
> > > > > artifacts
> > > > > - BB10: does not exist
> > > > > - iOS: does not exist
> > > > > - log
> > > > > - Android: `adb logcat`
> > > > > - BB10: does not exist
> > > > > - iOS: `tail -f console.log`
> > > > > - release:
> > > > > - Android `ant release`, compiles with your actual signing key
> > > > > - BB10: NOPE
> > > > > - iOS: compiles with xcodebuild with configuration set to
> > "Release"
> > > > > - run:
> > > > > - Android: runs on EITHER a connected device, or if no device,
> on
> > a
> > > > > running emulator, or if no running emulator, launches an emulator
> > (and
> > > if
> > > > > multiple emulator profiles exist, prompts user to pick one), then
> > > finally
> > > > > runs the app on it
> > > > > - BB10: asks user if there's a connected device. Then either
> > > launches
> > > > a
> > > > > simulator + loads the app (if user says he/she has no connected
> > > device),
> > > > > or attempts runs a debug build of the app on a connected device
> > > > > - iOS: launches an emulator using ios-sim with the app
> > > > > - emulate:
> > > > > - Android: does not exist
> > > > > - BB10: does not exist
> > > > > - iOS: launches an emulator using ios-sim with the app
> > > > >
> > > > > Easy Wins
> > > > > ---------
> > > > >
> > > > > - build: BB10 should change current behaviour so that it doesn't
> > code
> > > > > sign the package.
> > > > > - clean: add scripts for BB10 and iOS to support this (should be
> > dead
> > > > > simple).
> > > > > - release: BB10 should implement a script that runs a build + a
> > > > code-sign
> > > > > on the built package.
> > > > >
> > > > > Harder Wins
> > > > > -----------
> > > > >
> > > > > There's confusing behavior with run + emulate commands across
> > > platforms.
> > > > > IMO emulate should handle launching an emulator, and run should
> > handle
> > > > > deployment, with an extra flag available for run command that
> > specifies
> > > > > the deployment target (device or emulator, perhaps --device and
> > > > > --emulator). Also not entirely sure how Ripple fits in here but I
> > would
> > > > > definitely like to see Ripple as the default emulator target.
> > > > >
> > > > > Lots to chew on here but I would highly appreciate some feedback!
> > > > Renaming
> > > > > some of these commands is on the table too if anyone sees benefit
> > > there!
> > > > >
> > > > > [1] https://issues.apache.org/jira/browse/CB-2722
> > > > > [2] https://issues.apache.org/jira/browse/CB-2724
> > > > >
> > > > >
> > > >
> > >
> >
>
>
>
> --
> Timothy Kim
>
Re: Platform-level command line scripts
Posted by Tim Kim <ti...@gmail.com>.
I agree with the BlackBerry scripts must do. Most of the BlackBerry stuff
should be pretty simple. If you took all the existing ant commands and
what's in the cordova scripts already, you're most of the way there.
However, I'm not sure what log would look like. I think there's a way to
ssh your way into the BB10 and get access to the device log which could be
pretty useful. However, I haven't been able to do it on my dev alpha (was
locked out via file permissions), but maybe the z10 is able to???
On 19 March 2013 17:25, Benn Mapes <be...@gmail.com> wrote:
> Ok just to get this straight, we would like to see these scripts in the
> cordova directory of a Cordova project.
>
> *build* - compiles the project so that it can be deployed (possible flags
> are debug and release?)
>
> *clean* - removes all generated files (are these just the project specific
> files or the ones generated for the platform as well, i.e CordovaDeploy.exe
> for windows)
>
> *log *- logs device output (not supported yet for windows)
>
> *release* - Is this just the equivalent of `build` but in release mode?
> maybe you can just make this a flag in the build script?
>
> *run *- This would handle deploying the already built application to a
> device or emulator of the users choosing (do we want to prompt for this or
> use flags to decide?)
>
> *emulate* - I like jesse's suggestion that this should be used for *ripple
> only*
> *
> *
> Cheers,
> ~Benn
>
>
> On Tue, Mar 19, 2013 at 4:48 PM, Jesse <pu...@gmail.com> wrote:
>
> > I agree with Anis, and your easy wins Fil!
> >
> > emulate is confusing, unless emulate is 'ripple only!'
> >
> > I think run should take a parameter which specifies where it should run,
> > defaulting to an attached device perhaps.
> >
> > The cordova-deploy tool for Windows Phone 8 and Windows Phone 7 ( same
> API,
> > different implementations/requirements/libraries ) has a simple interface
> > where you can call it with -devices and it will simply list targets [1]
> >
> >
> > In this case, the deploy tool is not going to build anything, as it is
> > specifically *just* a deploy tool, but ultimately on WP7+8 this is what
> the
> > cl tools will use anyway.
> > An approach like this allows you to target multiple emulators ( WP8 has 7
> > different emulators )
> >
> >
> > [1]
> >
> >
> https://github.com/purplecabbage/cordova-wp8/blob/master/tooling/CordovaDeploy/CordovaDeploy/Program.cs#L45
> >
> > @purplecabbage
> > risingj.com
> >
> >
> > On Tue, Mar 19, 2013 at 4:32 PM, Anis KADRI <an...@gmail.com>
> wrote:
> >
> > > I agree with your easy wins.
> > >
> > > As for the 'emulate' command I don't think it should exist and should
> be
> > > replaced with 'run'. I thought we agreed on it in a previous thread. I
> > > believe the way Android does it is the way to go.
> > >
> > > The issue is to get it to work on iOS with Fruitstrap. Obviously we
> can't
> > > ship FruitStrap with Cordova but we can script it to download it when
> we
> > > use the "run" command.
> > >
> > > Don't know anything about BlackBerry but I want to say that there
> should
> > be
> > > a way to detected connected devices without prompting the user, yes ?
> > >
> > > -a
> > >
> > >
> > > On Tue, Mar 19, 2013 at 3:42 PM, Filip Maj <fi...@adobe.com> wrote:
> > >
> > > > Bringing this up once more, hopefully the last time :)
> > > >
> > > > TL;DR: the behavior and naming of the platform-level scripts are
> still
> > > not
> > > > 100% lined up. I'd like to fix this and agree with you all on some of
> > the
> > > > finer points surrounding this issue.
> > > >
> > > > Benn Mapes, an intern at Adobe, has been working on adding Windows
> > Phone
> > > > support to cordova-cli. It's been a bit of work, but the first step
> is
> > to
> > > > land command line scripts at the Windows Phone project level, which
> he
> > is
> > > > actively working on. With this happening, I want to make sure we have
> > our
> > > > base project-level CLI scripts sorted properly.
> > > >
> > > > Additionally, I've been seeing issues filed against the CLI with
> > > > essentially users being confused as to why the behavior of "cordova
> > > build"
> > > > vs "cordova emulate" on different platforms is different [1] [2].
> > > >
> > > > The answer to all of this is that the project-level scripts have
> > slightly
> > > > different behavior. I've looked into what each of Android, iOS and
> > > > BlackBerry (10) do and I've got a basic table sorted out (below). I
> > would
> > > > like to get to an agreement on naming and behavior for each, and
> > ideally
> > > > file issues to get as many of our platform implementations as
> possible
> > to
> > > > implement/tweak behavior so that we are consistent on this front.
> > > >
> > > > Scripts
> > > > -------
> > > >
> > > > - build
> > > > - Android: equivalent of running `ant debug`, which simply
> compiles
> > > > your app in debug mode
> > > > - BB10: packages your app into a zip, runs `bbwp` on it, and
> > > code-signs
> > > > it
> > > > - iOS: runs a compilation with xcodebuild with configuration set
> to
> > > > "Debug"
> > > > - clean
> > > > - Android: equivalent of running `ant clean`, which removes any
> > build
> > > > artifacts
> > > > - BB10: does not exist
> > > > - iOS: does not exist
> > > > - log
> > > > - Android: `adb logcat`
> > > > - BB10: does not exist
> > > > - iOS: `tail -f console.log`
> > > > - release:
> > > > - Android `ant release`, compiles with your actual signing key
> > > > - BB10: NOPE
> > > > - iOS: compiles with xcodebuild with configuration set to
> "Release"
> > > > - run:
> > > > - Android: runs on EITHER a connected device, or if no device, on
> a
> > > > running emulator, or if no running emulator, launches an emulator
> (and
> > if
> > > > multiple emulator profiles exist, prompts user to pick one), then
> > finally
> > > > runs the app on it
> > > > - BB10: asks user if there's a connected device. Then either
> > launches
> > > a
> > > > simulator + loads the app (if user says he/she has no connected
> > device),
> > > > or attempts runs a debug build of the app on a connected device
> > > > - iOS: launches an emulator using ios-sim with the app
> > > > - emulate:
> > > > - Android: does not exist
> > > > - BB10: does not exist
> > > > - iOS: launches an emulator using ios-sim with the app
> > > >
> > > > Easy Wins
> > > > ---------
> > > >
> > > > - build: BB10 should change current behaviour so that it doesn't
> code
> > > > sign the package.
> > > > - clean: add scripts for BB10 and iOS to support this (should be
> dead
> > > > simple).
> > > > - release: BB10 should implement a script that runs a build + a
> > > code-sign
> > > > on the built package.
> > > >
> > > > Harder Wins
> > > > -----------
> > > >
> > > > There's confusing behavior with run + emulate commands across
> > platforms.
> > > > IMO emulate should handle launching an emulator, and run should
> handle
> > > > deployment, with an extra flag available for run command that
> specifies
> > > > the deployment target (device or emulator, perhaps --device and
> > > > --emulator). Also not entirely sure how Ripple fits in here but I
> would
> > > > definitely like to see Ripple as the default emulator target.
> > > >
> > > > Lots to chew on here but I would highly appreciate some feedback!
> > > Renaming
> > > > some of these commands is on the table too if anyone sees benefit
> > there!
> > > >
> > > > [1] https://issues.apache.org/jira/browse/CB-2722
> > > > [2] https://issues.apache.org/jira/browse/CB-2724
> > > >
> > > >
> > >
> >
>
--
Timothy Kim
Re: Platform-level command line scripts
Posted by Benn Mapes <be...@gmail.com>.
Ok just to get this straight, we would like to see these scripts in the
cordova directory of a Cordova project.
*build* - compiles the project so that it can be deployed (possible flags
are debug and release?)
*clean* - removes all generated files (are these just the project specific
files or the ones generated for the platform as well, i.e CordovaDeploy.exe
for windows)
*log *- logs device output (not supported yet for windows)
*release* - Is this just the equivalent of `build` but in release mode?
maybe you can just make this a flag in the build script?
*run *- This would handle deploying the already built application to a
device or emulator of the users choosing (do we want to prompt for this or
use flags to decide?)
*emulate* - I like jesse's suggestion that this should be used for *ripple
only*
*
*
Cheers,
~Benn
On Tue, Mar 19, 2013 at 4:48 PM, Jesse <pu...@gmail.com> wrote:
> I agree with Anis, and your easy wins Fil!
>
> emulate is confusing, unless emulate is 'ripple only!'
>
> I think run should take a parameter which specifies where it should run,
> defaulting to an attached device perhaps.
>
> The cordova-deploy tool for Windows Phone 8 and Windows Phone 7 ( same API,
> different implementations/requirements/libraries ) has a simple interface
> where you can call it with -devices and it will simply list targets [1]
>
>
> In this case, the deploy tool is not going to build anything, as it is
> specifically *just* a deploy tool, but ultimately on WP7+8 this is what the
> cl tools will use anyway.
> An approach like this allows you to target multiple emulators ( WP8 has 7
> different emulators )
>
>
> [1]
>
> https://github.com/purplecabbage/cordova-wp8/blob/master/tooling/CordovaDeploy/CordovaDeploy/Program.cs#L45
>
> @purplecabbage
> risingj.com
>
>
> On Tue, Mar 19, 2013 at 4:32 PM, Anis KADRI <an...@gmail.com> wrote:
>
> > I agree with your easy wins.
> >
> > As for the 'emulate' command I don't think it should exist and should be
> > replaced with 'run'. I thought we agreed on it in a previous thread. I
> > believe the way Android does it is the way to go.
> >
> > The issue is to get it to work on iOS with Fruitstrap. Obviously we can't
> > ship FruitStrap with Cordova but we can script it to download it when we
> > use the "run" command.
> >
> > Don't know anything about BlackBerry but I want to say that there should
> be
> > a way to detected connected devices without prompting the user, yes ?
> >
> > -a
> >
> >
> > On Tue, Mar 19, 2013 at 3:42 PM, Filip Maj <fi...@adobe.com> wrote:
> >
> > > Bringing this up once more, hopefully the last time :)
> > >
> > > TL;DR: the behavior and naming of the platform-level scripts are still
> > not
> > > 100% lined up. I'd like to fix this and agree with you all on some of
> the
> > > finer points surrounding this issue.
> > >
> > > Benn Mapes, an intern at Adobe, has been working on adding Windows
> Phone
> > > support to cordova-cli. It's been a bit of work, but the first step is
> to
> > > land command line scripts at the Windows Phone project level, which he
> is
> > > actively working on. With this happening, I want to make sure we have
> our
> > > base project-level CLI scripts sorted properly.
> > >
> > > Additionally, I've been seeing issues filed against the CLI with
> > > essentially users being confused as to why the behavior of "cordova
> > build"
> > > vs "cordova emulate" on different platforms is different [1] [2].
> > >
> > > The answer to all of this is that the project-level scripts have
> slightly
> > > different behavior. I've looked into what each of Android, iOS and
> > > BlackBerry (10) do and I've got a basic table sorted out (below). I
> would
> > > like to get to an agreement on naming and behavior for each, and
> ideally
> > > file issues to get as many of our platform implementations as possible
> to
> > > implement/tweak behavior so that we are consistent on this front.
> > >
> > > Scripts
> > > -------
> > >
> > > - build
> > > - Android: equivalent of running `ant debug`, which simply compiles
> > > your app in debug mode
> > > - BB10: packages your app into a zip, runs `bbwp` on it, and
> > code-signs
> > > it
> > > - iOS: runs a compilation with xcodebuild with configuration set to
> > > "Debug"
> > > - clean
> > > - Android: equivalent of running `ant clean`, which removes any
> build
> > > artifacts
> > > - BB10: does not exist
> > > - iOS: does not exist
> > > - log
> > > - Android: `adb logcat`
> > > - BB10: does not exist
> > > - iOS: `tail -f console.log`
> > > - release:
> > > - Android `ant release`, compiles with your actual signing key
> > > - BB10: NOPE
> > > - iOS: compiles with xcodebuild with configuration set to "Release"
> > > - run:
> > > - Android: runs on EITHER a connected device, or if no device, on a
> > > running emulator, or if no running emulator, launches an emulator (and
> if
> > > multiple emulator profiles exist, prompts user to pick one), then
> finally
> > > runs the app on it
> > > - BB10: asks user if there's a connected device. Then either
> launches
> > a
> > > simulator + loads the app (if user says he/she has no connected
> device),
> > > or attempts runs a debug build of the app on a connected device
> > > - iOS: launches an emulator using ios-sim with the app
> > > - emulate:
> > > - Android: does not exist
> > > - BB10: does not exist
> > > - iOS: launches an emulator using ios-sim with the app
> > >
> > > Easy Wins
> > > ---------
> > >
> > > - build: BB10 should change current behaviour so that it doesn't code
> > > sign the package.
> > > - clean: add scripts for BB10 and iOS to support this (should be dead
> > > simple).
> > > - release: BB10 should implement a script that runs a build + a
> > code-sign
> > > on the built package.
> > >
> > > Harder Wins
> > > -----------
> > >
> > > There's confusing behavior with run + emulate commands across
> platforms.
> > > IMO emulate should handle launching an emulator, and run should handle
> > > deployment, with an extra flag available for run command that specifies
> > > the deployment target (device or emulator, perhaps --device and
> > > --emulator). Also not entirely sure how Ripple fits in here but I would
> > > definitely like to see Ripple as the default emulator target.
> > >
> > > Lots to chew on here but I would highly appreciate some feedback!
> > Renaming
> > > some of these commands is on the table too if anyone sees benefit
> there!
> > >
> > > [1] https://issues.apache.org/jira/browse/CB-2722
> > > [2] https://issues.apache.org/jira/browse/CB-2724
> > >
> > >
> >
>
Re: Platform-level command line scripts
Posted by Jesse <pu...@gmail.com>.
I agree with Anis, and your easy wins Fil!
emulate is confusing, unless emulate is 'ripple only!'
I think run should take a parameter which specifies where it should run,
defaulting to an attached device perhaps.
The cordova-deploy tool for Windows Phone 8 and Windows Phone 7 ( same API,
different implementations/requirements/libraries ) has a simple interface
where you can call it with -devices and it will simply list targets [1]
In this case, the deploy tool is not going to build anything, as it is
specifically *just* a deploy tool, but ultimately on WP7+8 this is what the
cl tools will use anyway.
An approach like this allows you to target multiple emulators ( WP8 has 7
different emulators )
[1]
https://github.com/purplecabbage/cordova-wp8/blob/master/tooling/CordovaDeploy/CordovaDeploy/Program.cs#L45
@purplecabbage
risingj.com
On Tue, Mar 19, 2013 at 4:32 PM, Anis KADRI <an...@gmail.com> wrote:
> I agree with your easy wins.
>
> As for the 'emulate' command I don't think it should exist and should be
> replaced with 'run'. I thought we agreed on it in a previous thread. I
> believe the way Android does it is the way to go.
>
> The issue is to get it to work on iOS with Fruitstrap. Obviously we can't
> ship FruitStrap with Cordova but we can script it to download it when we
> use the "run" command.
>
> Don't know anything about BlackBerry but I want to say that there should be
> a way to detected connected devices without prompting the user, yes ?
>
> -a
>
>
> On Tue, Mar 19, 2013 at 3:42 PM, Filip Maj <fi...@adobe.com> wrote:
>
> > Bringing this up once more, hopefully the last time :)
> >
> > TL;DR: the behavior and naming of the platform-level scripts are still
> not
> > 100% lined up. I'd like to fix this and agree with you all on some of the
> > finer points surrounding this issue.
> >
> > Benn Mapes, an intern at Adobe, has been working on adding Windows Phone
> > support to cordova-cli. It's been a bit of work, but the first step is to
> > land command line scripts at the Windows Phone project level, which he is
> > actively working on. With this happening, I want to make sure we have our
> > base project-level CLI scripts sorted properly.
> >
> > Additionally, I've been seeing issues filed against the CLI with
> > essentially users being confused as to why the behavior of "cordova
> build"
> > vs "cordova emulate" on different platforms is different [1] [2].
> >
> > The answer to all of this is that the project-level scripts have slightly
> > different behavior. I've looked into what each of Android, iOS and
> > BlackBerry (10) do and I've got a basic table sorted out (below). I would
> > like to get to an agreement on naming and behavior for each, and ideally
> > file issues to get as many of our platform implementations as possible to
> > implement/tweak behavior so that we are consistent on this front.
> >
> > Scripts
> > -------
> >
> > - build
> > - Android: equivalent of running `ant debug`, which simply compiles
> > your app in debug mode
> > - BB10: packages your app into a zip, runs `bbwp` on it, and
> code-signs
> > it
> > - iOS: runs a compilation with xcodebuild with configuration set to
> > "Debug"
> > - clean
> > - Android: equivalent of running `ant clean`, which removes any build
> > artifacts
> > - BB10: does not exist
> > - iOS: does not exist
> > - log
> > - Android: `adb logcat`
> > - BB10: does not exist
> > - iOS: `tail -f console.log`
> > - release:
> > - Android `ant release`, compiles with your actual signing key
> > - BB10: NOPE
> > - iOS: compiles with xcodebuild with configuration set to "Release"
> > - run:
> > - Android: runs on EITHER a connected device, or if no device, on a
> > running emulator, or if no running emulator, launches an emulator (and if
> > multiple emulator profiles exist, prompts user to pick one), then finally
> > runs the app on it
> > - BB10: asks user if there's a connected device. Then either launches
> a
> > simulator + loads the app (if user says he/she has no connected device),
> > or attempts runs a debug build of the app on a connected device
> > - iOS: launches an emulator using ios-sim with the app
> > - emulate:
> > - Android: does not exist
> > - BB10: does not exist
> > - iOS: launches an emulator using ios-sim with the app
> >
> > Easy Wins
> > ---------
> >
> > - build: BB10 should change current behaviour so that it doesn't code
> > sign the package.
> > - clean: add scripts for BB10 and iOS to support this (should be dead
> > simple).
> > - release: BB10 should implement a script that runs a build + a
> code-sign
> > on the built package.
> >
> > Harder Wins
> > -----------
> >
> > There's confusing behavior with run + emulate commands across platforms.
> > IMO emulate should handle launching an emulator, and run should handle
> > deployment, with an extra flag available for run command that specifies
> > the deployment target (device or emulator, perhaps --device and
> > --emulator). Also not entirely sure how Ripple fits in here but I would
> > definitely like to see Ripple as the default emulator target.
> >
> > Lots to chew on here but I would highly appreciate some feedback!
> Renaming
> > some of these commands is on the table too if anyone sees benefit there!
> >
> > [1] https://issues.apache.org/jira/browse/CB-2722
> > [2] https://issues.apache.org/jira/browse/CB-2724
> >
> >
>
Re: Platform-level command line scripts
Posted by Anis KADRI <an...@gmail.com>.
I agree with your easy wins.
As for the 'emulate' command I don't think it should exist and should be
replaced with 'run'. I thought we agreed on it in a previous thread. I
believe the way Android does it is the way to go.
The issue is to get it to work on iOS with Fruitstrap. Obviously we can't
ship FruitStrap with Cordova but we can script it to download it when we
use the "run" command.
Don't know anything about BlackBerry but I want to say that there should be
a way to detected connected devices without prompting the user, yes ?
-a
On Tue, Mar 19, 2013 at 3:42 PM, Filip Maj <fi...@adobe.com> wrote:
> Bringing this up once more, hopefully the last time :)
>
> TL;DR: the behavior and naming of the platform-level scripts are still not
> 100% lined up. I'd like to fix this and agree with you all on some of the
> finer points surrounding this issue.
>
> Benn Mapes, an intern at Adobe, has been working on adding Windows Phone
> support to cordova-cli. It's been a bit of work, but the first step is to
> land command line scripts at the Windows Phone project level, which he is
> actively working on. With this happening, I want to make sure we have our
> base project-level CLI scripts sorted properly.
>
> Additionally, I've been seeing issues filed against the CLI with
> essentially users being confused as to why the behavior of "cordova build"
> vs "cordova emulate" on different platforms is different [1] [2].
>
> The answer to all of this is that the project-level scripts have slightly
> different behavior. I've looked into what each of Android, iOS and
> BlackBerry (10) do and I've got a basic table sorted out (below). I would
> like to get to an agreement on naming and behavior for each, and ideally
> file issues to get as many of our platform implementations as possible to
> implement/tweak behavior so that we are consistent on this front.
>
> Scripts
> -------
>
> - build
> - Android: equivalent of running `ant debug`, which simply compiles
> your app in debug mode
> - BB10: packages your app into a zip, runs `bbwp` on it, and code-signs
> it
> - iOS: runs a compilation with xcodebuild with configuration set to
> "Debug"
> - clean
> - Android: equivalent of running `ant clean`, which removes any build
> artifacts
> - BB10: does not exist
> - iOS: does not exist
> - log
> - Android: `adb logcat`
> - BB10: does not exist
> - iOS: `tail -f console.log`
> - release:
> - Android `ant release`, compiles with your actual signing key
> - BB10: NOPE
> - iOS: compiles with xcodebuild with configuration set to "Release"
> - run:
> - Android: runs on EITHER a connected device, or if no device, on a
> running emulator, or if no running emulator, launches an emulator (and if
> multiple emulator profiles exist, prompts user to pick one), then finally
> runs the app on it
> - BB10: asks user if there's a connected device. Then either launches a
> simulator + loads the app (if user says he/she has no connected device),
> or attempts runs a debug build of the app on a connected device
> - iOS: launches an emulator using ios-sim with the app
> - emulate:
> - Android: does not exist
> - BB10: does not exist
> - iOS: launches an emulator using ios-sim with the app
>
> Easy Wins
> ---------
>
> - build: BB10 should change current behaviour so that it doesn't code
> sign the package.
> - clean: add scripts for BB10 and iOS to support this (should be dead
> simple).
> - release: BB10 should implement a script that runs a build + a code-sign
> on the built package.
>
> Harder Wins
> -----------
>
> There's confusing behavior with run + emulate commands across platforms.
> IMO emulate should handle launching an emulator, and run should handle
> deployment, with an extra flag available for run command that specifies
> the deployment target (device or emulator, perhaps --device and
> --emulator). Also not entirely sure how Ripple fits in here but I would
> definitely like to see Ripple as the default emulator target.
>
> Lots to chew on here but I would highly appreciate some feedback! Renaming
> some of these commands is on the table too if anyone sees benefit there!
>
> [1] https://issues.apache.org/jira/browse/CB-2722
> [2] https://issues.apache.org/jira/browse/CB-2724
>
>