Tommy-Carlos: Just so I understand, are you saying that it is necessary to
run a script to move your icons around correctly?  Isn't that defeating the
point of the merges folder?  Are you using merges/ specifically for its
merging ability, or just as a place to hold resources -- and isn't the
www/.  If the latter, then really you would prefer to use a 3rd "resources"
folder or something, no?


As far as what the contents of an "app bundle" are, we discussed this a bit
before.  Here are some relevant portions from old "apps folder" threads:

*"First, some of the other (perceived) benefits of an app folder are:*
* * we do a raw cp -r of the www/ folder, and so that should have only
platform agnostic and "necessary" files.*
** merges folder was removed from www/ because it did not meet above
criteria, and config.xml is another candidate*
** there also potentially exist docs/ (useful for shared apps, like
mobile-spec), platform specific resource files (icons, splash screen), etc
*
** a git repository is already basically mirroring the concept of the "app
folder""*

And from another:

*"So packaging an app right now already involves putting merges/ and www/
into some container (I called this an app/ folder), and unpacking is
currently done by unpacking that app/ into some temporary directory, and
then copy/link both folders into a cordova workspace.*
*
*
*If we decided to support installing apps, we can choose to do that: unpack
into a temporary location and then copy/link each of the interesting
folders.  But in order to also copy docs/ etc we should probably copy all
the app contents into the cordova workspace.  We can either do that
directly into the top level, mixed with the cordova workspace artifacts, or
put it into a nice app/ folder, so that its easier to
track/version/organize and potentially even add support for multiple apps."*


..sorry to beat a dead horse, but the point is that although we decided not
to add an actual "app/" folder, I still think we need to treat all files
inside an app bundle as being "the app", not just look for www/ and
merges/.  Then, devs can bundle whatever extra resources however they want,
and it also gives us an easy path forward for adding docs/ and tests/ and
etc to apps as well as plugins.

(For backwards compat, we do need to check for existance of www/ and
fallback to old behaviour if it does not - like Fil's code does already).

-Michal

On Fri, Jul 26, 2013 at 12:26 PM, Filip Maj <f...@adobe.com> wrote:

> There is some basic code in place to check if a downloaded www app .tgz
> has an index.html at the top-level of the archive or in a sub-directory
> called 'www' [1].
>
> Perhaps moving this code over to the lazy loading module and generalizing
> it a bit to handle merges makes sense.
>
> [1] https://github.com/apache/cordova-cli/blob/master/src/create.js#L111
>
> On 7/26/13 7:55 AM, "Brian LeRoux" <b...@brian.io> wrote:
>
> >Why not just dist examples as:
> >
> >./
> > |- merges/
> > '- www/
> >
> >The act of seeding those two directories is a essentially always a
> >clobber anyhow. In our magic future wherein ./platforms goes away this
> >is what apps look like anyhow.
> >
> >
> >On Thu, Jul 25, 2013 at 6:43 PM, Filip Maj <f...@adobe.com> wrote:
> >> Wouldn't that require us to author a different module depending on the
> >> application template used?
> >>
> >> On 7/25/13 2:10 PM, "Anis KADRI" <anis.ka...@gmail.com> wrote:
> >>
> >>>I think there should be a module that does all this stuff. Depending
> >>>on the input, CLI would execute the right commands and copy files to
> >>>the right folders (www/ merges/ etc...) or not if it's an empty app.
> >>>
> >>>On Thu, Jul 25, 2013 at 10:46 AM, Filip Maj <f...@adobe.com> wrote:
> >>>> So then how should this be handled? Do we reshape the
> >>>> cordova-ehllo-world-app? Do we add another module in the cli to handle
> >>>> moving all that stuff around? How does this tie into the "ability to
> >>>> select app template at create time" feature request? [1]
> >>>>
> >>>> [1] https://issues.apache.org/jira/browse/CB-4153
> >>>>
> >>>> On 7/25/13 10:41 AM, "Anis KADRI" <anis.ka...@gmail.com> wrote:
> >>>>
> >>>>>+1 for dropping them in merges/
> >>>>>
> >>>>>On Thu, Jul 25, 2013 at 8:51 AM, Braden Shepherdson
> >>>>><bra...@chromium.org>
> >>>>>wrote:
> >>>>>> Setting them up, at least in the default app for cli, in merges/
> >>>>>>makes
> >>>>>> sense to me. That's the right thing to do, and we want to encourage
> >>>>>>it.
> >>>>>>
> >>>>>> Braden
> >>>>>>
> >>>>>>
> >>>>>> On Thu, Jul 25, 2013 at 7:06 AM, Tommy-Carlos Williams
> >>>>>> <to...@devgeeks.org>wrote:
> >>>>>>
> >>>>>>> Agreed.
> >>>>>>>
> >>>>>>> It's the difference between a 7-8MB app and a 1MB app on Android
> >>>>>>>for
> >>>>>>> example.
> >>>>>>>
> >>>>>>> I have moved mine out into merges, personallyŠ so only iOS gets the
> >>>>>>>iOS
> >>>>>>> splash screens, etc.
> >>>>>>>
> >>>>>>> Then I use a hook to copy them into the correct file names to be
> >>>>>>>used
> >>>>>>>in
> >>>>>>> the app.
> >>>>>>>
> >>>>>>> - tommy
> >>>>>>>
> >>>>>>>
> >>>>>>> On 24/07/2013, at 10:51 PM, Darryl Pogue <dar...@dpogue.ca> wrote:
> >>>>>>>
> >>>>>>> > On Wed, Jul 24, 2013 at 10:24 PM, Filip Maj <f...@adobe.com>
> >>>>>>>wrote:
> >>>>>>> >
> >>>>>>> >> How should we proceed? Close as Not A Problem? On the one hand
> >>>>>>>this
> >>>>>>>is a
> >>>>>>> >> userspace problem, on the other we're doing not doing a good job
> >>>>>>>of
> >>>>>>> >> encouraging sound engineering.
> >>>>>>> >>
> >>>>>>> >> What about having the default app have the right types of
> >>>>>>>merges/
> >>>>>>> >> overrides?
> >>>>>>> >>
> >>>>>>> >> Thoughts?
> >>>>>>> >>
> >>>>>>> >
> >>>>>>> > I had raised a point about this back when there was some
> >>>>>>>discussion
> >>>>>>>about
> >>>>>>> > icons
> >>>>>>> > being specified in config.xml[1].
> >>>>>>> >
> >>>>>>> > Apparently discussion moved to the mailing list, but I don't
> >>>>>>>think
> >>>>>>>there
> >>>>>>> > were
> >>>>>>> > any conclusions.
> >>>>>>> >
> >>>>>>> > The issue really isn't that this project includes all these
> >>>>>>> splash-screens
> >>>>>>> > and
> >>>>>>> > icons, but rather that they're in the www folder and end up
> >>>>>>>getting
> >>>>>>> copied
> >>>>>>> > into
> >>>>>>> > each platform's assets.
> >>>>>>> >
> >>>>>>> > [1]
> >>>>>>> >
> >>>>>>>
> >>>>>>>
> https://issues.apache.org/jira/browse/CB-2606?focusedCommentId=13593
> >>>>>>>06
> >>>>>>>7&
> >>>>>>>page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpane
> >>>>>>>l#
> >>>>>>>co
> >>>>>>>mment-13593067
> >>>>>>>
> >>>>>>>
> >>>>
> >>
>
>

Reply via email to