Tl;dr I'd like to propose a different but similar solution based on the
evolution of WebWorks. That we automatically inject cordova.js into a
specific place in the app (say the root since thats where cordova_plugins
is) and then the developer simply adds a script tag to the correct
location accounting for the build command to place it there for them. This
guarantees they will always have a script compatible with the native
components.

For those who don't know, at blackberry we worked on a proprietary web
platform roughly equivalent to cordova, that the cordova implementation
was based on.

When we re-wrote it we initially copied the cordova approach and named our
file webworks-version.js. Then we made the switch exactly like the one
being proposed here and went with webworks.js.
        The very next version we had a huge problem where people were forgetting
to update their scripts constantly.
        We next tried to solve this by adding code to make sure that the script
tag was compatible with the native code. This worked fine but was still a
large hassle for developers and especially people publishing things like
samples since their script was constantly out of date.
        Finally we settled on the solution I'm proposing here, where we injected
the script into approot/chrome/webworks.js and the html referenced it
there. We never had any problems or complaints since.

On 13-05-01 4:01 AM, "Giorgio Natili" <g.nat...@gnstudio.com> wrote:

>+1 cordova.js with version as a header comment
>
>
>On Wed, May 1, 2013 at 6:15 AM, Benn Mapes <benn.ma...@gmail.com> wrote:
>
>> +1 for sure....
>>
>>
>> On Tue, Apr 30, 2013 at 2:39 PM, Anis KADRI <anis.ka...@gmail.com>
>>wrote:
>>
>> > +1!
>> >
>> >
>> > On Tue, Apr 30, 2013 at 1:19 PM, Jesse <purplecabb...@gmail.com>
>>wrote:
>> >
>> > > +1
>> > >
>> > > @purplecabbage
>> > > risingj.com
>> > >
>> > >
>> > > On Tue, Apr 30, 2013 at 1:04 PM, Shazron <shaz...@gmail.com> wrote:
>> > >
>> > > > +1
>> > > >
>> > > >
>> > > > On Tue, Apr 30, 2013 at 12:54 PM, James Jong
>><wjamesj...@gmail.com>
>> > > wrote:
>> > > >
>> > > > > +1 Cleaner.  Thanks Andrew!
>> > > > >
>> > > > > -James Jong
>> > > > >
>> > > > > On Apr 30, 2013, at 3:31 PM, Lorin Beer
>><lorin.beer....@gmail.com>
>> > > > wrote:
>> > > > >
>> > > > > > +1
>> > > > > > duplicated information is a good redundancy to remove
>> > > > > >
>> > > > > >
>> > > > > > On Tue, Apr 30, 2013 at 11:41 AM, Brian LeRoux <b...@brian.io>
>> wrote:
>> > > > > >
>> > > > > >> Sounds good. FTR we did it for issue tracking not
>>arbitrarily.
>> > > Having
>> > > > > >> a stamp at the top of the file fulfills the same end.
>> > > > > >>
>> > > > > >> On Tue, Apr 30, 2013 at 11:31 AM, Filip Maj <f...@adobe.com>
>> > wrote:
>> > > > > >>> If I recall correctly the original reason was because
>>putting
>> the
>> > > > > version
>> > > > > >>> in after the lib name in the JS filename was what "other
>> > libraries
>> > > > did"
>> > > > > >>> aka jQuery.
>> > > > > >>>
>> > > > > >>> +1 from me.
>> > > > > >>>
>> > > > > >>> On 4/30/13 11:24 AM, "tommy-carlos Williams" <
>> to...@devgeeks.org
>> > >
>> > > > > wrote:
>> > > > > >>>
>> > > > > >>>> +1
>> > > > > >>>>
>> > > > > >>>> Wouldn't this make mobile spec easier too?
>> > > > > >>>>
>> > > > > >>>> On 01/05/2013, at 4:20, Andrew Grieve
>><agri...@chromium.org>
>> > > wrote:
>> > > > > >>>>
>> > > > > >>>>> This has been brought up a few times, but I'm not sure
>> there's
>> > > > been a
>> > > > > >>>>> decisive answer here yet...
>> > > > > >>>>>
>> > > > > >>>>> iOS now uses "cordova.ios.js"
>> > > > > >>>>> Android uses "cordova.android.js", but renames it in a
>>build
>> > step
>> > > > to
>> > > > > >>>>> add in
>> > > > > >>>>> the version number.
>> > > > > >>>>> CLI normalizes to "cordova.js"
>> > > > > >>>>>
>> > > > > >>>>> The version number is now stamped at the top of the file
>>in a
>> > > code
>> > > > > >>>>> comment,
>> > > > > >>>>> and I feel that having it in the file name just makes work
>> for
>> > us
>> > > > and
>> > > > > >>>>> our
>> > > > > >>>>> users. I'd like to change all repos to just use
>>"cordova.js".
>> > > > > >>>>>
>> > > > > >>>>> Any objections?
>> > > > > >>>>>
>> > > > > >>>>> Andrew
>> > > > > >>>
>> > > > > >>
>> > > > >
>> > > > >
>> > > >
>> > >
>> >
>>


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

Reply via email to