You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Anis KADRI <an...@gmail.com> on 2014/07/07 21:58:19 UTC

Re: Browserify JS is in

On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <ao...@wizcorp.jp> wrote:

> Anis that is really sweet.
> If this hits CLI, plugin.xml will have sections for plugins to do web
> actions?
>

Not sure I understand what you mean by web actions.


> TBH.. i've always wanted a cordova platform add web... but i'd be happy
> enough with a prepare for browser only mode.
>

`cordova platform add web` is part of the plan.


>
> Seeing a lot of use cases (e.g. Facebook plugin etc.) where there are JS,
> iOS & Android SDKs and a Cordova Plugin wants to support the same API on
> all platforms.
>

Didn't think of that but it is applicable indeed.


>
>
>
> On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <an...@gmail.com> wrote:
>
> > Ok cool. I can look at adding a --browserify option for run and prepare.
> I
> > logged an issue for it [1]
> >
> > [1] https://issues.apache.org/jira/browse/CB-7001
> >
> >
> > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <ag...@chromium.org>
> > wrote:
> >
> > > Thanks Anis!
> > >
> > > Tougher for CLI since it's actually the prepare step that creates
> > > cordova_plugins.js, but longer term (medium term?) I don't see why we
> > > shouldn't just turn it on always anyways.
> > >
> > > So... Maybe cordova prepare --browserify?
> > > Build prepares first, so will also need: cordova run android
> --browserify
> > >
> > > I haven't looked at it yet. Google IO is next week and it's been
> > consuming
> > > most of our time the last few weeks. Will definitely play with it next
> > next
> > > week though!
> > >
> > >
> > >
> > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <an...@gmail.com>
> > wrote:
> > >
> > >> Sorry. I forgot you asked the question. There was no issue but there
> is
> > >> one now.
> > >> https://issues.apache.org/jira/browse/CB-6990
> > >>
> > >> This "feature" is plugman only for now. How important is it to wire it
> > >> to CLI ? Have  you guys had time to test it out yet ? How would it
> > >> work with CLI ? Add another flag such as "cordova plugin add
> > >> --browserify" ?
> > >>
> > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <ag...@chromium.org>
> > >> wrote:
> > >> > bump
> > >> >
> > >> >
> > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> agrieve@chromium.org
> > >
> > >> > wrote:
> > >> >>
> > >> >> Cool, yes! Thanks for the update!
> > >> >>
> > >> >> Is there a JIRA for this? Was asked in
> > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> mmocny@chromium.org>
> > >> >> wrote:
> > >> >>>
> > >> >>> Awesome Anis.
> > >> >>>
> > >> >>> Will gladly take a look at this later today.  Just wanted to send
> a
> > >> quick
> > >> >>> thanks for landing this this way, and for the useful report.
> > >> >>>
> > >> >>> -Michal
> > >> >>>
> > >> >>>
> > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <anis.kadri@gmail.com
> >
> > >> wrote:
> > >> >>>
> > >> >>> > Yo,
> > >> >>> >
> > >> >>> > Just wanted to let everyone know that I added browserify support
> > to
> > >> >>> > plugman (behind a flag for now). CLI is not hooked to this yet.
> > Here
> > >> >>> > is how it works:
> > >> >>> >
> > >> >>> > plugman install --browserify --plugin [PLUGIN] --platform
> > [PLATFORM]
> > >> >>> > --project [PROJECT_PATH]
> > >> >>> >
> > >> >>> > will generate a browserify version of cordova.js. Plugins and
> > >> >>> > everything is bundled in. This version passes mobile-spec on iOS
> > and
> > >> >>> > Android. I am not yet setup to test other platforms.
> > >> >>> >
> > >> >>> > plugman install --plugin [PLUGIN] --platform [PLATFORM]
> --project
> > >> >>> > [PROJECT_PATH]
> > >> >>> >
> > >> >>> > Will continue to generate cordova.js the way it used to.
> > >> >>> >
> > >> >>> > Because some of you really care about benchmarks here is some
> > >> >>> > comparison for dependencies-plugin install:
> > >> >>> >
> > >> >>> > No browserify:
> > >> >>> >
> > >> >>> > real 0m9.546s
> > >> >>> > user 0m4.673s
> > >> >>> > sys 0m0.692s
> > >> >>> >
> > >> >>> > Browserify:
> > >> >>> > real 0m9.861s
> > >> >>> > user 0m4.759s
> > >> >>> > sys 0m0.648s
> > >> >>> >
> > >> >>> > All cordova-lib tests are passing so I am assuming this has
> > minimal
> > >> >>> > impact but LET ME KNOW otherwise.
> > >> >>> >
> > >> >>> > Anis
> > >> >>> >
> > >> >>
> > >> >>
> > >> >
> > >>
> > >
> > >
> >
>
>
>
> --
> <http://www.wizcorp.jp/>Ally Ogilvie
> Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> ------------------------------
> TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> Facebook
> <http://www.facebook.com/Wizcorp> | LinkedIn
> <http://www.linkedin.com/company/wizcorp>
>

Re: Browserify JS is in

Posted by Anis KADRI <an...@gmail.com>.
On Thu, Dec 11, 2014 at 11:38 AM, Andrew Grieve <ag...@chromium.org>
wrote:
>
> I'd really like to get it fully spelled out *why* browserify is the right
> tool for this. Some thoughts below:
>
> On Wed, Dec 10, 2014 at 8:35 PM, Brian LeRoux <b...@brian.io> wrote:
>
> > we should move browserify to main and drop that insane concat code
> >
> > its not heavyweight at all. it creates a hash in iife with deps mapped
> > in…as to why dep mgmt is better than concatenating…I don't think we need
> to
> > waste our time talking about that!
>
>
>
> What makes the concat code insane?
>  - It's easy to understand and make changes to
>  - It seems to work fine and is quite stable
>  - It has no dependencies (it's 52kb within cordova-js/tasks/lib)
>

This is mostly/probably applicable to you personally. I didn't get that
ease-to-understand-make-changes-to feeling when I started looking at this.
But hey… everyone's got different abilities :-S Besides, why do you want to
keep working on/maintaining (or not) a require/define system when there is
a good dedicated solution out there that is being worked
on/tested/validated?


>
> Browserify seems a bit scary to me:
> - It's 25MB and has a tonne of dependencies
> - Do we really need all of that functionality?
>

This is not personal but this is a very weak argument in my opinion.
cordova-js itself (minus browserify) is around 20Mb too. cordova-lib is
110M. It's not like we're bundling browserify as part of cordova.js.

We do need the a lot of the browserify functionality to replace our current
system and keep it backward compatible.


>
> I think it would actually help a lot to talk about dependency management.
> - Right now cordova-js creates a module for every file in src/
> - Plugins list each module explicitly in their plugin.xml
> With browserify, are you envisioning that this model change at all?
>

Absolutely nothing changes for now. Every core plugin just works out of the
box and mobile-spec (last time I tried) runs just as fine with either
version. In the future and if we follow the browserify path, we would drop
our current transforms (that ensure backwards compatibility) and start
writing plugins as proper node modules. Maybe even push them to npm and
manage dependencies that way.


>
>
> Why change anything?
> - cordova-lib should concat plugin modules with cordova.js on prepare (this
> is the motivation stated in the JIRA. totally on board with this!)
> What else would I like to see changed?
> - exec.js (and any other platform-specific modules) should move to live in
> platform repos
>   - This will make code changes that affect both much easier
> - Platforms should depend on cordova-js via package.json and snapshot
> generation should happen in bin/create as well as plugin add/rm
>   - This will remove the (somewhat) annoying step of snapshotting
>   - This will allow cordova-js to be released as it's own artifact
>     - Good because we can do things like add Promise polyfill and not need
> to release all platforms to pick it up
>     - A bit annoying since it's one more thing to release, but likely won't
> get released often.
>
>
This is all offered and being used right now (behind a flag). Take 15
minutes out of your day and give it a try and share some feedback.


>
> Please don't look at my email as trying to derail the work Anis did. I
> believe most of it is necessary to accomplish these goals whether we use
> Browserify, our own, or some other concattenator. I just question whether
> 25MB is too much complexity for what we need / want.
>

I really honestly don't care if my work gets derailed. My work, your work
and everybody's work will be irrelevant in 10 years. I just would love us
to use what's best for all of us. As of now, though I haven't read a single
valid argument.


>
>
>
>
> On Thu, Dec 11, 2014 at 2:10 PM, Joe Bowser <bo...@gmail.com> wrote:
>
> > This should be a major, but yeah, I'm fine with making this the default.
> >
> > On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
> >
> > > so I think this has baked long enough! lets make it the default and
> suss
> > > the bugs.
> > >
> > > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <ao...@wizcorp.jp>
> > wrote:
> > >
> > > > Ace, look forward to browser/web as platform. Combined Web and Native
> > API
> > > > plugin for Cordova! Yay!
> > > > Thanks for the clarification Michal.
> > > >
> > > >
> > > >
> > > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com>
> > wrote:
> > > >
> > > > > Right, browserify is just a way to package cordova.js that should
> > make
> > > it
> > > > > easier to add the browser as a platform so might not be directly
> > > related
> > > > > but is somewhat related :-}
> > > > >
> > > > >
> > > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <mm...@chromium.org>
> > > > wrote:
> > > > >
> > > > > > I think Ally may be confusing what this does?: This browserify
> work
> > > is
> > > > > not
> > > > > > a way to get cordova to run in a desktop browser, its just a
> means
> > > for
> > > > > > packaging cordova.js.  I think there should be no visible change
> to
> > > end
> > > > > > users.
> > > > > >
> > > > > > There is a separate effort to target the browser as a platform,
> and
> > > it
> > > > > may
> > > > > > be true that the browserify work helps with that, but its not
> > > directly
> > > > > > related.
> > > > > >
> > > > > >
> > > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <anis.kadri@gmail.com
> >
> > > > wrote:
> > > > > >
> > > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
> > aogilvie@wizcorp.jp
> > > >
> > > > > > wrote:
> > > > > > >
> > > > > > > > Anis that is really sweet.
> > > > > > > > If this hits CLI, plugin.xml will have sections for plugins
> to
> > do
> > > > web
> > > > > > > > actions?
> > > > > > > >
> > > > > > >
> > > > > > > Not sure I understand what you mean by web actions.
> > > > > > >
> > > > > > >
> > > > > > > > TBH.. i've always wanted a cordova platform add web... but
> i'd
> > be
> > > > > happy
> > > > > > > > enough with a prepare for browser only mode.
> > > > > > > >
> > > > > > >
> > > > > > > `cordova platform add web` is part of the plan.
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where
> > there
> > > > are
> > > > > > JS,
> > > > > > > > iOS & Android SDKs and a Cordova Plugin wants to support the
> > same
> > > > API
> > > > > > on
> > > > > > > > all platforms.
> > > > > > > >
> > > > > > >
> > > > > > > Didn't think of that but it is applicable indeed.
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
> > > anis.kadri@gmail.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Ok cool. I can look at adding a --browserify option for run
> > and
> > > > > > > prepare.
> > > > > > > > I
> > > > > > > > > logged an issue for it [1]
> > > > > > > > >
> > > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> > > > > agrieve@chromium.org
> > > > > > >
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Thanks Anis!
> > > > > > > > > >
> > > > > > > > > > Tougher for CLI since it's actually the prepare step that
> > > > creates
> > > > > > > > > > cordova_plugins.js, but longer term (medium term?) I
> don't
> > > see
> > > > > why
> > > > > > we
> > > > > > > > > > shouldn't just turn it on always anyways.
> > > > > > > > > >
> > > > > > > > > > So... Maybe cordova prepare --browserify?
> > > > > > > > > > Build prepares first, so will also need: cordova run
> > android
> > > > > > > > --browserify
> > > > > > > > > >
> > > > > > > > > > I haven't looked at it yet. Google IO is next week and
> it's
> > > > been
> > > > > > > > > consuming
> > > > > > > > > > most of our time the last few weeks. Will definitely play
> > > with
> > > > it
> > > > > > > next
> > > > > > > > > next
> > > > > > > > > > week though!
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> > > > > anis.kadri@gmail.com>
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > >> Sorry. I forgot you asked the question. There was no
> issue
> > > but
> > > > > > there
> > > > > > > > is
> > > > > > > > > >> one now.
> > > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > > > > > >>
> > > > > > > > > >> This "feature" is plugman only for now. How important is
> > it
> > > to
> > > > > > wire
> > > > > > > it
> > > > > > > > > >> to CLI ? Have  you guys had time to test it out yet ?
> How
> > > > would
> > > > > it
> > > > > > > > > >> work with CLI ? Add another flag such as "cordova plugin
> > add
> > > > > > > > > >> --browserify" ?
> > > > > > > > > >>
> > > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > > > > > agrieve@chromium.org>
> > > > > > > > > >> wrote:
> > > > > > > > > >> > bump
> > > > > > > > > >> >
> > > > > > > > > >> >
> > > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > > > > > > agrieve@chromium.org
> > > > > > > > > >
> > > > > > > > > >> > wrote:
> > > > > > > > > >> >>
> > > > > > > > > >> >> Cool, yes! Thanks for the update!
> > > > > > > > > >> >>
> > > > > > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > > > > > > mmocny@chromium.org>
> > > > > > > > > >> >> wrote:
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> Awesome Anis.
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> Will gladly take a look at this later today.  Just
> > > wanted
> > > > to
> > > > > > > send
> > > > > > > > a
> > > > > > > > > >> quick
> > > > > > > > > >> >>> thanks for landing this this way, and for the useful
> > > > report.
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> -Michal
> > > > > > > > > >> >>>
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > > > > > anis.kadri@gmail.com
> > > > > > > > >
> > > > > > > > > >> wrote:
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> > Yo,
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Just wanted to let everyone know that I added
> > > browserify
> > > > > > > support
> > > > > > > > > to
> > > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not hooked
> > to
> > > > this
> > > > > > > yet.
> > > > > > > > > Here
> > > > > > > > > >> >>> > is how it works:
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
> > > > --platform
> > > > > > > > > [PLATFORM]
> > > > > > > > > >> >>> > --project [PROJECT_PATH]
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > will generate a browserify version of cordova.js.
> > > > Plugins
> > > > > > and
> > > > > > > > > >> >>> > everything is bundled in. This version passes
> > > > mobile-spec
> > > > > on
> > > > > > > iOS
> > > > > > > > > and
> > > > > > > > > >> >>> > Android. I am not yet setup to test other
> platforms.
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
> > > [PLATFORM]
> > > > > > > > --project
> > > > > > > > > >> >>> > [PROJECT_PATH]
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Will continue to generate cordova.js the way it
> used
> > > to.
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Because some of you really care about benchmarks
> > here
> > > is
> > > > > > some
> > > > > > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > No browserify:
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > real 0m9.546s
> > > > > > > > > >> >>> > user 0m4.673s
> > > > > > > > > >> >>> > sys 0m0.692s
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Browserify:
> > > > > > > > > >> >>> > real 0m9.861s
> > > > > > > > > >> >>> > user 0m4.759s
> > > > > > > > > >> >>> > sys 0m0.648s
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > All cordova-lib tests are passing so I am assuming
> > > this
> > > > > has
> > > > > > > > > minimal
> > > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Anis
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >
> > > > > > > > > >>
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
> > http://www.wizcorp.jp/>
> > > > > > > > ------------------------------
> > > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
> > Website
> > > > > > > > <http://www.wizcorp.jp/> | Twitter <
> > https://twitter.com/Wizcorp>
> > > |
> > > > > > > > Facebook
> > > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > > ------------------------------
> > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > > > Facebook
> > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > <http://www.linkedin.com/company/wizcorp>
> > > >
> > >
> >
>

Re: Browserify JS is in

Posted by Steven Gill <st...@gmail.com>.
Answers inline based on my understanding.

Current system vs Browserify system (which exists behind a flag currently)

On Thu, Dec 11, 2014 at 11:38 AM, Andrew Grieve <ag...@chromium.org>
wrote:

> I'd really like to get it fully spelled out *why* browserify is the right
> tool for this. Some thoughts below:
>
> On Wed, Dec 10, 2014 at 8:35 PM, Brian LeRoux <b...@brian.io> wrote:
>
> > we should move browserify to main and drop that insane concat code
> >
> > its not heavyweight at all. it creates a hash in iife with deps mapped
> > in...as to why dep mgmt is better than concatenating...I don't think we need
> to
> > waste our time talking about that!
>
>
>
> What makes the concat code insane?
>  - It's easy to understand and make changes to
>  - It seems to work fine and is quite stable
>  - It has no dependencies (it's 52kb within cordova-js/tasks/lib)
>

The current system does not concat code. It is all runtime based. It is not
designed for build time. cordova_plugins.js is built and read in by
cordova.js at runtime. It injects script tags for the files being added.
This is ugly. cordova_plugins.js doesn't exist anymore with browserify
system.


> Browserify seems a bit scary to me:
> - It's 25MB and has a tonne of dependencies
> - Do we really need all of that functionality?


Browserify is widely used and actually comes with docs unlike our code. We
are currently using browserify transforms to handle plugins which aren't
using standard requires (
https://github.com/apache/cordova-plugin-contacts/blob/master/www/ios/Contact.js#L23,
it is incorrectly requiring a file that is a directory above). Transforms
ensure backwards compatibility for this plugin in the wild (after we fix
this issue). Browserify also has built in checks to verify what we require
exists and give us errors if it doesn't.
Browserify handles duplication of deps. It won't concat the same file twice
if you are using it twice.


I think it would actually help a lot to talk about dependency management.
> - Right now cordova-js creates a module for every file in src/
> - Plugins list each module explicitly in their plugin.xml
> With browserify, are you envisioning that this model change at all?
>
>
Possibly, but this involves updating plugins. Merges/clobbers/runs are
being used in the browserify system to do variable assignment. If we moved
variable assignment to the plugins themsevles, those tags would be useless.



> Why change anything?
> - cordova-lib should concat plugin modules with cordova.js on prepare (this
> is the motivation stated in the JIRA. totally on board with this!)
>

This is one of the main driving points of the browserify work. This is
happening now with browserify system.


> What else would I like to see changed?
> - exec.js (and any other platform-specific modules) should move to live in
> platform repos
>   - This will make code changes that affect both much easier
>


> - Platforms should depend on cordova-js via package.json and snapshot
> generation should happen in bin/create as well as plugin add/rm
>   - This will remove the (somewhat) annoying step of snapshotting
>   - This will allow cordova-js to be released as it's own artifact
>     - Good because we can do things like add Promise polyfill and not need
> to release all platforms to pick it up
>     - A bit annoying since it's one more thing to release, but likely won't
> get released often.
>

 This is also pretty much in place in the browserify system. We are
releasing cordova.js part of tools releases (
https://www.npmjs.org/package/cordova-js). It is currently a dependency for
cordova-lib. Cordova.js is generated on prepare and concats all of the
required files. It also runs the transforms we need. Browserify system
currently handles this step in cordova-lib instead of platforms. Benefits
to both approaches though. This doesn't rely on snapshotted version and has
the benefit of us releasing cordova-js and not having to update platforms.

>
>
> Please don't look at my email as trying to derail the work Anis did. I
> believe most of it is necessary to accomplish these goals whether we use
> Browserify, our own, or some other concattenator. I just question whether
> 25MB is too much complexity for what we need / want.
>
>
I think 25MB is fine. It shrinks are basic cordova.js file quite a bit and
that has more impact to develoers apps than a build time dependency.

>
>
> On Thu, Dec 11, 2014 at 2:10 PM, Joe Bowser <bo...@gmail.com> wrote:
>
> > This should be a major, but yeah, I'm fine with making this the default.
> >
> > On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
> >
> > > so I think this has baked long enough! lets make it the default and
> suss
> > > the bugs.
> > >
> > > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <ao...@wizcorp.jp>
> > wrote:
> > >
> > > > Ace, look forward to browser/web as platform. Combined Web and Native
> > API
> > > > plugin for Cordova! Yay!
> > > > Thanks for the clarification Michal.
> > > >
> > > >
> > > >
> > > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com>
> > wrote:
> > > >
> > > > > Right, browserify is just a way to package cordova.js that should
> > make
> > > it
> > > > > easier to add the browser as a platform so might not be directly
> > > related
> > > > > but is somewhat related :-}
> > > > >
> > > > >
> > > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <mm...@chromium.org>
> > > > wrote:
> > > > >
> > > > > > I think Ally may be confusing what this does?: This browserify
> work
> > > is
> > > > > not
> > > > > > a way to get cordova to run in a desktop browser, its just a
> means
> > > for
> > > > > > packaging cordova.js.  I think there should be no visible change
> to
> > > end
> > > > > > users.
> > > > > >
> > > > > > There is a separate effort to target the browser as a platform,
> and
> > > it
> > > > > may
> > > > > > be true that the browserify work helps with that, but its not
> > > directly
> > > > > > related.
> > > > > >
> > > > > >
> > > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <anis.kadri@gmail.com
> >
> > > > wrote:
> > > > > >
> > > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
> > aogilvie@wizcorp.jp
> > > >
> > > > > > wrote:
> > > > > > >
> > > > > > > > Anis that is really sweet.
> > > > > > > > If this hits CLI, plugin.xml will have sections for plugins
> to
> > do
> > > > web
> > > > > > > > actions?
> > > > > > > >
> > > > > > >
> > > > > > > Not sure I understand what you mean by web actions.
> > > > > > >
> > > > > > >
> > > > > > > > TBH.. i've always wanted a cordova platform add web... but
> i'd
> > be
> > > > > happy
> > > > > > > > enough with a prepare for browser only mode.
> > > > > > > >
> > > > > > >
> > > > > > > `cordova platform add web` is part of the plan.
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where
> > there
> > > > are
> > > > > > JS,
> > > > > > > > iOS & Android SDKs and a Cordova Plugin wants to support the
> > same
> > > > API
> > > > > > on
> > > > > > > > all platforms.
> > > > > > > >
> > > > > > >
> > > > > > > Didn't think of that but it is applicable indeed.
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
> > > anis.kadri@gmail.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Ok cool. I can look at adding a --browserify option for run
> > and
> > > > > > > prepare.
> > > > > > > > I
> > > > > > > > > logged an issue for it [1]
> > > > > > > > >
> > > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> > > > > agrieve@chromium.org
> > > > > > >
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Thanks Anis!
> > > > > > > > > >
> > > > > > > > > > Tougher for CLI since it's actually the prepare step that
> > > > creates
> > > > > > > > > > cordova_plugins.js, but longer term (medium term?) I
> don't
> > > see
> > > > > why
> > > > > > we
> > > > > > > > > > shouldn't just turn it on always anyways.
> > > > > > > > > >
> > > > > > > > > > So... Maybe cordova prepare --browserify?
> > > > > > > > > > Build prepares first, so will also need: cordova run
> > android
> > > > > > > > --browserify
> > > > > > > > > >
> > > > > > > > > > I haven't looked at it yet. Google IO is next week and
> it's
> > > > been
> > > > > > > > > consuming
> > > > > > > > > > most of our time the last few weeks. Will definitely play
> > > with
> > > > it
> > > > > > > next
> > > > > > > > > next
> > > > > > > > > > week though!
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> > > > > anis.kadri@gmail.com>
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > >> Sorry. I forgot you asked the question. There was no
> issue
> > > but
> > > > > > there
> > > > > > > > is
> > > > > > > > > >> one now.
> > > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > > > > > >>
> > > > > > > > > >> This "feature" is plugman only for now. How important is
> > it
> > > to
> > > > > > wire
> > > > > > > it
> > > > > > > > > >> to CLI ? Have  you guys had time to test it out yet ?
> How
> > > > would
> > > > > it
> > > > > > > > > >> work with CLI ? Add another flag such as "cordova plugin
> > add
> > > > > > > > > >> --browserify" ?
> > > > > > > > > >>
> > > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > > > > > agrieve@chromium.org>
> > > > > > > > > >> wrote:
> > > > > > > > > >> > bump
> > > > > > > > > >> >
> > > > > > > > > >> >
> > > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > > > > > > agrieve@chromium.org
> > > > > > > > > >
> > > > > > > > > >> > wrote:
> > > > > > > > > >> >>
> > > > > > > > > >> >> Cool, yes! Thanks for the update!
> > > > > > > > > >> >>
> > > > > > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > > > > > > mmocny@chromium.org>
> > > > > > > > > >> >> wrote:
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> Awesome Anis.
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> Will gladly take a look at this later today.  Just
> > > wanted
> > > > to
> > > > > > > send
> > > > > > > > a
> > > > > > > > > >> quick
> > > > > > > > > >> >>> thanks for landing this this way, and for the useful
> > > > report.
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> -Michal
> > > > > > > > > >> >>>
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > > > > > anis.kadri@gmail.com
> > > > > > > > >
> > > > > > > > > >> wrote:
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> > Yo,
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Just wanted to let everyone know that I added
> > > browserify
> > > > > > > support
> > > > > > > > > to
> > > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not hooked
> > to
> > > > this
> > > > > > > yet.
> > > > > > > > > Here
> > > > > > > > > >> >>> > is how it works:
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
> > > > --platform
> > > > > > > > > [PLATFORM]
> > > > > > > > > >> >>> > --project [PROJECT_PATH]
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > will generate a browserify version of cordova.js.
> > > > Plugins
> > > > > > and
> > > > > > > > > >> >>> > everything is bundled in. This version passes
> > > > mobile-spec
> > > > > on
> > > > > > > iOS
> > > > > > > > > and
> > > > > > > > > >> >>> > Android. I am not yet setup to test other
> platforms.
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
> > > [PLATFORM]
> > > > > > > > --project
> > > > > > > > > >> >>> > [PROJECT_PATH]
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Will continue to generate cordova.js the way it
> used
> > > to.
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Because some of you really care about benchmarks
> > here
> > > is
> > > > > > some
> > > > > > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > No browserify:
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > real 0m9.546s
> > > > > > > > > >> >>> > user 0m4.673s
> > > > > > > > > >> >>> > sys 0m0.692s
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Browserify:
> > > > > > > > > >> >>> > real 0m9.861s
> > > > > > > > > >> >>> > user 0m4.759s
> > > > > > > > > >> >>> > sys 0m0.648s
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > All cordova-lib tests are passing so I am assuming
> > > this
> > > > > has
> > > > > > > > > minimal
> > > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Anis
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >
> > > > > > > > > >>
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
> > http://www.wizcorp.jp/>
> > > > > > > > ------------------------------
> > > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
> > Website
> > > > > > > > <http://www.wizcorp.jp/> | Twitter <
> > https://twitter.com/Wizcorp>
> > > |
> > > > > > > > Facebook
> > > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > > ------------------------------
> > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > > > Facebook
> > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > <http://www.linkedin.com/company/wizcorp>
> > > >
> > >
> >
>

Re: Browserify JS is in

Posted by Michal Mocny <mm...@chromium.org>.
Okay, well we've got some tests to do and can come back here with results.

One feature I would like to not lose: cordova_plugins.js is bad for many
reasons, but I have found it useful on several occasions to get a full list
of plugins & versions that shipped with an app.  One reason is for the
mobile-spec test-framework.  (I don't think I use that any more, since now
I iterate js-modules).  Another reason was to unpack an apk I had built in
the past and figure out which plugins (and versions) I had shipped with it.

I'm not saying we need to use a file for plugin loading, but I would not
like to lose this metadata for future-proofing.  Filed CB-8153.

-Michal

On Thu, Dec 11, 2014 at 10:46 PM, Ian Clelland <ic...@chromium.org>
wrote:

> On Thu Dec 11 2014 at 9:29:08 PM Anis KADRI <an...@gmail.com> wrote:
>
> > On Thu, Dec 11, 2014 at 1:45 PM, Michal Mocny <mm...@chromium.org>
> wrote:
> > >
> > > 25MB is for the one-time cordova-cli install, and not overhead for the
> > > app.  Its not perfect but not a blocker imho.
> >
>
> Agreed. In terms of size for a developer tool, that's not too bad. And if
> for that we get a community, bug fixes, more eyes, and fixes for the edge
> cases that we haven't come across yet, then it's a pretty small price.
>
>
> > >
> > > There are more troubling things about the change than the size
> overhead:
> > > - I don't think browserify has "baked" at all.  It was landed behind a
> > > flag, but is it actually used anywhere?
> > > - Why browserify and not webpack (aside: its 13Mb..)?  Was it compared
> at
> > > all..
> >
>
> > - Last time it was discussed, there were still several breaking changes
> > for
> > > plugins.  Were they resolved?
> > >
> > > Anyway, how can we get data on the change to see if it is positive?:
> > > - Existing plugins continue to work (We run mobile spec, and get
> > downstream
> > > distributions run tests on their plugins).
> > > - Startup time is not negatively affected.
> > > - Build/prepare time is not negatively affected.
> > >
> > > Is that fair?
> > >
> >
> > Absolutely totally fair. Those are valid concerns.
> >
> > I tried the core plugins and they all work and all pass mobile-spec. I
> know
> > you guys (ab)use require('./Module') a lot in chrome plugins but they
> > should still all pass. I actually would be curious to know the results.
> >
>
> I just checked our code, and the only place I see that construct in plugins
> is in org.chromium.runtime -- it uses "require('./CryptoJS-sha256')" to
> access the CryptoJS library, without having to make that a separate plugin.
> Is there a better way that we should be doing that?
>
>
> > Startup should be faster because it is not XHRing a different file to
> get a
> > list of plugins to <script> inject them. I actually didn't benchmark this
> > but it would be interesting.
> >
>
> This is a win -- I remember that we were all pretty excited about not
> having all of the code baked in to cordova.js when 3.0 came out, but people
> have complained that the result is slower startup times, because of the
> extra XHRs.
>
> Build time is slowed down by a few ms (re-read the first email of this
> > thread).
> >
>
> And, of course, that's absolutely dwarfed by every other measurable factor.
>
> I think this is a good step forward (so long as it's all working) -- If we
> just switch the default, then people still have the ability to build
> without it, right?
>
> I just wonder whether semver requires us to bump the major version of
> anything because of this (and if so, then what? CLI? JS? Lib? Everything?)
> or whether a "no breaking changes, no new features" change can count as a
> patch version increment.
>
>
> > >
> > > -Michal
> > >
> > > On Thu, Dec 11, 2014 at 2:38 PM, Andrew Grieve <ag...@chromium.org>
> > > wrote:
> > >
> > > > I'd really like to get it fully spelled out *why* browserify is the
> > right
> > > > tool for this. Some thoughts below:
> > > >
> > > > On Wed, Dec 10, 2014 at 8:35 PM, Brian LeRoux <b...@brian.io> wrote:
> > > >
> > > > > we should move browserify to main and drop that insane concat code
> > > > >
> > > > > its not heavyweight at all. it creates a hash in iife with deps
> > mapped
> > > > > in…as to why dep mgmt is better than concatenating…I don't think we
> > > need
> > > > to
> > > > > waste our time talking about that!
> > > >
> > > >
> > > >
> > > > What makes the concat code insane?
> > > >  - It's easy to understand and make changes to
> > > >  - It seems to work fine and is quite stable
> > > >  - It has no dependencies (it's 52kb within cordova-js/tasks/lib)
> > > >
> > > > Browserify seems a bit scary to me:
> > > > - It's 25MB and has a tonne of dependencies
> > > > - Do we really need all of that functionality?
> > > >
> > > > I think it would actually help a lot to talk about dependency
> > management.
> > > > - Right now cordova-js creates a module for every file in src/
> > > > - Plugins list each module explicitly in their plugin.xml
> > > > With browserify, are you envisioning that this model change at all?
> > > >
> > > >
> > > > Why change anything?
> > > > - cordova-lib should concat plugin modules with cordova.js on prepare
> > > (this
> > > > is the motivation stated in the JIRA. totally on board with this!)
> > > > What else would I like to see changed?
> > > > - exec.js (and any other platform-specific modules) should move to
> live
> > > in
> > > > platform repos
> > > >   - This will make code changes that affect both much easier
> > > > - Platforms should depend on cordova-js via package.json and snapshot
> > > > generation should happen in bin/create as well as plugin add/rm
> > > >   - This will remove the (somewhat) annoying step of snapshotting
> > > >   - This will allow cordova-js to be released as it's own artifact
> > > >     - Good because we can do things like add Promise polyfill and not
> > > need
> > > > to release all platforms to pick it up
> > > >     - A bit annoying since it's one more thing to release, but likely
> > > won't
> > > > get released often.
> > > >
> > > >
> > > > Please don't look at my email as trying to derail the work Anis did.
> I
> > > > believe most of it is necessary to accomplish these goals whether we
> > use
> > > > Browserify, our own, or some other concattenator. I just question
> > whether
> > > > 25MB is too much complexity for what we need / want.
> > > >
> > > >
> > > >
> > > >
> > > > On Thu, Dec 11, 2014 at 2:10 PM, Joe Bowser <bo...@gmail.com>
> wrote:
> > > >
> > > > > This should be a major, but yeah, I'm fine with making this the
> > > default.
> > > > >
> > > > > On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
> > > > >
> > > > > > so I think this has baked long enough! lets make it the default
> and
> > > > suss
> > > > > > the bugs.
> > > > > >
> > > > > > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <
> aogilvie@wizcorp.jp
> > >
> > > > > wrote:
> > > > > >
> > > > > > > Ace, look forward to browser/web as platform. Combined Web and
> > > Native
> > > > > API
> > > > > > > plugin for Cordova! Yay!
> > > > > > > Thanks for the clarification Michal.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <
> anis.kadri@gmail.com
> > >
> > > > > wrote:
> > > > > > >
> > > > > > > > Right, browserify is just a way to package cordova.js that
> > should
> > > > > make
> > > > > > it
> > > > > > > > easier to add the browser as a platform so might not be
> > directly
> > > > > > related
> > > > > > > > but is somewhat related :-}
> > > > > > > >
> > > > > > > >
> > > > > > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <
> > > mmocny@chromium.org>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > I think Ally may be confusing what this does?: This
> > browserify
> > > > work
> > > > > > is
> > > > > > > > not
> > > > > > > > > a way to get cordova to run in a desktop browser, its just
> a
> > > > means
> > > > > > for
> > > > > > > > > packaging cordova.js.  I think there should be no visible
> > > change
> > > > to
> > > > > > end
> > > > > > > > > users.
> > > > > > > > >
> > > > > > > > > There is a separate effort to target the browser as a
> > platform,
> > > > and
> > > > > > it
> > > > > > > > may
> > > > > > > > > be true that the browserify work helps with that, but its
> not
> > > > > > directly
> > > > > > > > > related.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <
> > > anis.kadri@gmail.com
> > > > >
> > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
> > > > > aogilvie@wizcorp.jp
> > > > > > >
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Anis that is really sweet.
> > > > > > > > > > > If this hits CLI, plugin.xml will have sections for
> > plugins
> > > > to
> > > > > do
> > > > > > > web
> > > > > > > > > > > actions?
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Not sure I understand what you mean by web actions.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > TBH.. i've always wanted a cordova platform add web...
> > but
> > > > i'd
> > > > > be
> > > > > > > > happy
> > > > > > > > > > > enough with a prepare for browser only mode.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > `cordova platform add web` is part of the plan.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.)
> > where
> > > > > there
> > > > > > > are
> > > > > > > > > JS,
> > > > > > > > > > > iOS & Android SDKs and a Cordova Plugin wants to
> support
> > > the
> > > > > same
> > > > > > > API
> > > > > > > > > on
> > > > > > > > > > > all platforms.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Didn't think of that but it is applicable indeed.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
> > > > > > anis.kadri@gmail.com>
> > > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Ok cool. I can look at adding a --browserify option
> for
> > > run
> > > > > and
> > > > > > > > > > prepare.
> > > > > > > > > > > I
> > > > > > > > > > > > logged an issue for it [1]
> > > > > > > > > > > >
> > > > > > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> > > > > > > > agrieve@chromium.org
> > > > > > > > > >
> > > > > > > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > Thanks Anis!
> > > > > > > > > > > > >
> > > > > > > > > > > > > Tougher for CLI since it's actually the prepare
> step
> > > that
> > > > > > > creates
> > > > > > > > > > > > > cordova_plugins.js, but longer term (medium term?)
> I
> > > > don't
> > > > > > see
> > > > > > > > why
> > > > > > > > > we
> > > > > > > > > > > > > shouldn't just turn it on always anyways.
> > > > > > > > > > > > >
> > > > > > > > > > > > > So... Maybe cordova prepare --browserify?
> > > > > > > > > > > > > Build prepares first, so will also need: cordova
> run
> > > > > android
> > > > > > > > > > > --browserify
> > > > > > > > > > > > >
> > > > > > > > > > > > > I haven't looked at it yet. Google IO is next week
> > and
> > > > it's
> > > > > > > been
> > > > > > > > > > > > consuming
> > > > > > > > > > > > > most of our time the last few weeks. Will
> definitely
> > > play
> > > > > > with
> > > > > > > it
> > > > > > > > > > next
> > > > > > > > > > > > next
> > > > > > > > > > > > > week though!
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> > > > > > > > anis.kadri@gmail.com>
> > > > > > > > > > > > wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > >> Sorry. I forgot you asked the question. There was
> no
> > > > issue
> > > > > > but
> > > > > > > > > there
> > > > > > > > > > > is
> > > > > > > > > > > > >> one now.
> > > > > > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > > > > > > > > >>
> > > > > > > > > > > > >> This "feature" is plugman only for now. How
> > important
> > > is
> > > > > it
> > > > > > to
> > > > > > > > > wire
> > > > > > > > > > it
> > > > > > > > > > > > >> to CLI ? Have  you guys had time to test it out
> yet
> > ?
> > > > How
> > > > > > > would
> > > > > > > > it
> > > > > > > > > > > > >> work with CLI ? Add another flag such as "cordova
> > > plugin
> > > > > add
> > > > > > > > > > > > >> --browserify" ?
> > > > > > > > > > > > >>
> > > > > > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > > > > > > > > agrieve@chromium.org>
> > > > > > > > > > > > >> wrote:
> > > > > > > > > > > > >> > bump
> > > > > > > > > > > > >> >
> > > > > > > > > > > > >> >
> > > > > > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve
> <
> > > > > > > > > > > agrieve@chromium.org
> > > > > > > > > > > > >
> > > > > > > > > > > > >> > wrote:
> > > > > > > > > > > > >> >>
> > > > > > > > > > > > >> >> Cool, yes! Thanks for the update!
> > > > > > > > > > > > >> >>
> > > > > > > > > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > > > > > > > > >> >>
> > > > > > > > > > > > >> >>
> > > > > > > > > > > > >> >>
> > > > > > > > > > > > >> >>
> > > > > > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny
> <
> > > > > > > > > > > mmocny@chromium.org>
> > > > > > > > > > > > >> >> wrote:
> > > > > > > > > > > > >> >>>
> > > > > > > > > > > > >> >>> Awesome Anis.
> > > > > > > > > > > > >> >>>
> > > > > > > > > > > > >> >>> Will gladly take a look at this later today.
> > Just
> > > > > > wanted
> > > > > > > to
> > > > > > > > > > send
> > > > > > > > > > > a
> > > > > > > > > > > > >> quick
> > > > > > > > > > > > >> >>> thanks for landing this this way, and for the
> > > useful
> > > > > > > report.
> > > > > > > > > > > > >> >>>
> > > > > > > > > > > > >> >>> -Michal
> > > > > > > > > > > > >> >>>
> > > > > > > > > > > > >> >>>
> > > > > > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > > > > > > > > anis.kadri@gmail.com
> > > > > > > > > > > >
> > > > > > > > > > > > >> wrote:
> > > > > > > > > > > > >> >>>
> > > > > > > > > > > > >> >>> > Yo,
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>> > Just wanted to let everyone know that I
> added
> > > > > > browserify
> > > > > > > > > > support
> > > > > > > > > > > > to
> > > > > > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not
> > > hooked
> > > > > to
> > > > > > > this
> > > > > > > > > > yet.
> > > > > > > > > > > > Here
> > > > > > > > > > > > >> >>> > is how it works:
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>> > plugman install --browserify --plugin
> [PLUGIN]
> > > > > > > --platform
> > > > > > > > > > > > [PLATFORM]
> > > > > > > > > > > > >> >>> > --project [PROJECT_PATH]
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>> > will generate a browserify version of
> > > cordova.js.
> > > > > > > Plugins
> > > > > > > > > and
> > > > > > > > > > > > >> >>> > everything is bundled in. This version
> passes
> > > > > > > mobile-spec
> > > > > > > > on
> > > > > > > > > > iOS
> > > > > > > > > > > > and
> > > > > > > > > > > > >> >>> > Android. I am not yet setup to test other
> > > > platforms.
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
> > > > > > [PLATFORM]
> > > > > > > > > > > --project
> > > > > > > > > > > > >> >>> > [PROJECT_PATH]
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>> > Will continue to generate cordova.js the way
> > it
> > > > used
> > > > > > to.
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>> > Because some of you really care about
> > benchmarks
> > > > > here
> > > > > > is
> > > > > > > > > some
> > > > > > > > > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>> > No browserify:
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>> > real 0m9.546s
> > > > > > > > > > > > >> >>> > user 0m4.673s
> > > > > > > > > > > > >> >>> > sys 0m0.692s
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>> > Browserify:
> > > > > > > > > > > > >> >>> > real 0m9.861s
> > > > > > > > > > > > >> >>> > user 0m4.759s
> > > > > > > > > > > > >> >>> > sys 0m0.648s
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>> > All cordova-lib tests are passing so I am
> > > assuming
> > > > > > this
> > > > > > > > has
> > > > > > > > > > > > minimal
> > > > > > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>> > Anis
> > > > > > > > > > > > >> >>> >
> > > > > > > > > > > > >> >>
> > > > > > > > > > > > >> >>
> > > > > > > > > > > > >> >
> > > > > > > > > > > > >>
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
> > > > > http://www.wizcorp.jp/>
> > > > > > > > > > > ------------------------------
> > > > > > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448
> |
> > > > > Website
> > > > > > > > > > > <http://www.wizcorp.jp/> | Twitter <
> > > > > https://twitter.com/Wizcorp>
> > > > > > |
> > > > > > > > > > > Facebook
> > > > > > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
> http://www.wizcorp.jp/>
> > > > > > > ------------------------------
> > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
> Website
> > > > > > > <http://www.wizcorp.jp/> | Twitter <
> https://twitter.com/Wizcorp>
> > |
> > > > > > > Facebook
> > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Browserify JS is in

Posted by Ian Clelland <ic...@chromium.org>.
On Thu Dec 11 2014 at 9:29:08 PM Anis KADRI <an...@gmail.com> wrote:

> On Thu, Dec 11, 2014 at 1:45 PM, Michal Mocny <mm...@chromium.org> wrote:
> >
> > 25MB is for the one-time cordova-cli install, and not overhead for the
> > app.  Its not perfect but not a blocker imho.
>

Agreed. In terms of size for a developer tool, that's not too bad. And if
for that we get a community, bug fixes, more eyes, and fixes for the edge
cases that we haven't come across yet, then it's a pretty small price.


> >
> > There are more troubling things about the change than the size overhead:
> > - I don't think browserify has "baked" at all.  It was landed behind a
> > flag, but is it actually used anywhere?
> > - Why browserify and not webpack (aside: its 13Mb..)?  Was it compared at
> > all..
>

> - Last time it was discussed, there were still several breaking changes
> for
> > plugins.  Were they resolved?
> >
> > Anyway, how can we get data on the change to see if it is positive?:
> > - Existing plugins continue to work (We run mobile spec, and get
> downstream
> > distributions run tests on their plugins).
> > - Startup time is not negatively affected.
> > - Build/prepare time is not negatively affected.
> >
> > Is that fair?
> >
>
> Absolutely totally fair. Those are valid concerns.
>
> I tried the core plugins and they all work and all pass mobile-spec. I know
> you guys (ab)use require('./Module') a lot in chrome plugins but they
> should still all pass. I actually would be curious to know the results.
>

I just checked our code, and the only place I see that construct in plugins
is in org.chromium.runtime -- it uses "require('./CryptoJS-sha256')" to
access the CryptoJS library, without having to make that a separate plugin.
Is there a better way that we should be doing that?


> Startup should be faster because it is not XHRing a different file to get a
> list of plugins to <script> inject them. I actually didn't benchmark this
> but it would be interesting.
>

This is a win -- I remember that we were all pretty excited about not
having all of the code baked in to cordova.js when 3.0 came out, but people
have complained that the result is slower startup times, because of the
extra XHRs.

Build time is slowed down by a few ms (re-read the first email of this
> thread).
>

And, of course, that's absolutely dwarfed by every other measurable factor.

I think this is a good step forward (so long as it's all working) -- If we
just switch the default, then people still have the ability to build
without it, right?

I just wonder whether semver requires us to bump the major version of
anything because of this (and if so, then what? CLI? JS? Lib? Everything?)
or whether a "no breaking changes, no new features" change can count as a
patch version increment.


> >
> > -Michal
> >
> > On Thu, Dec 11, 2014 at 2:38 PM, Andrew Grieve <ag...@chromium.org>
> > wrote:
> >
> > > I'd really like to get it fully spelled out *why* browserify is the
> right
> > > tool for this. Some thoughts below:
> > >
> > > On Wed, Dec 10, 2014 at 8:35 PM, Brian LeRoux <b...@brian.io> wrote:
> > >
> > > > we should move browserify to main and drop that insane concat code
> > > >
> > > > its not heavyweight at all. it creates a hash in iife with deps
> mapped
> > > > in…as to why dep mgmt is better than concatenating…I don't think we
> > need
> > > to
> > > > waste our time talking about that!
> > >
> > >
> > >
> > > What makes the concat code insane?
> > >  - It's easy to understand and make changes to
> > >  - It seems to work fine and is quite stable
> > >  - It has no dependencies (it's 52kb within cordova-js/tasks/lib)
> > >
> > > Browserify seems a bit scary to me:
> > > - It's 25MB and has a tonne of dependencies
> > > - Do we really need all of that functionality?
> > >
> > > I think it would actually help a lot to talk about dependency
> management.
> > > - Right now cordova-js creates a module for every file in src/
> > > - Plugins list each module explicitly in their plugin.xml
> > > With browserify, are you envisioning that this model change at all?
> > >
> > >
> > > Why change anything?
> > > - cordova-lib should concat plugin modules with cordova.js on prepare
> > (this
> > > is the motivation stated in the JIRA. totally on board with this!)
> > > What else would I like to see changed?
> > > - exec.js (and any other platform-specific modules) should move to live
> > in
> > > platform repos
> > >   - This will make code changes that affect both much easier
> > > - Platforms should depend on cordova-js via package.json and snapshot
> > > generation should happen in bin/create as well as plugin add/rm
> > >   - This will remove the (somewhat) annoying step of snapshotting
> > >   - This will allow cordova-js to be released as it's own artifact
> > >     - Good because we can do things like add Promise polyfill and not
> > need
> > > to release all platforms to pick it up
> > >     - A bit annoying since it's one more thing to release, but likely
> > won't
> > > get released often.
> > >
> > >
> > > Please don't look at my email as trying to derail the work Anis did. I
> > > believe most of it is necessary to accomplish these goals whether we
> use
> > > Browserify, our own, or some other concattenator. I just question
> whether
> > > 25MB is too much complexity for what we need / want.
> > >
> > >
> > >
> > >
> > > On Thu, Dec 11, 2014 at 2:10 PM, Joe Bowser <bo...@gmail.com> wrote:
> > >
> > > > This should be a major, but yeah, I'm fine with making this the
> > default.
> > > >
> > > > On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
> > > >
> > > > > so I think this has baked long enough! lets make it the default and
> > > suss
> > > > > the bugs.
> > > > >
> > > > > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <aogilvie@wizcorp.jp
> >
> > > > wrote:
> > > > >
> > > > > > Ace, look forward to browser/web as platform. Combined Web and
> > Native
> > > > API
> > > > > > plugin for Cordova! Yay!
> > > > > > Thanks for the clarification Michal.
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <anis.kadri@gmail.com
> >
> > > > wrote:
> > > > > >
> > > > > > > Right, browserify is just a way to package cordova.js that
> should
> > > > make
> > > > > it
> > > > > > > easier to add the browser as a platform so might not be
> directly
> > > > > related
> > > > > > > but is somewhat related :-}
> > > > > > >
> > > > > > >
> > > > > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <
> > mmocny@chromium.org>
> > > > > > wrote:
> > > > > > >
> > > > > > > > I think Ally may be confusing what this does?: This
> browserify
> > > work
> > > > > is
> > > > > > > not
> > > > > > > > a way to get cordova to run in a desktop browser, its just a
> > > means
> > > > > for
> > > > > > > > packaging cordova.js.  I think there should be no visible
> > change
> > > to
> > > > > end
> > > > > > > > users.
> > > > > > > >
> > > > > > > > There is a separate effort to target the browser as a
> platform,
> > > and
> > > > > it
> > > > > > > may
> > > > > > > > be true that the browserify work helps with that, but its not
> > > > > directly
> > > > > > > > related.
> > > > > > > >
> > > > > > > >
> > > > > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <
> > anis.kadri@gmail.com
> > > >
> > > > > > wrote:
> > > > > > > >
> > > > > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
> > > > aogilvie@wizcorp.jp
> > > > > >
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Anis that is really sweet.
> > > > > > > > > > If this hits CLI, plugin.xml will have sections for
> plugins
> > > to
> > > > do
> > > > > > web
> > > > > > > > > > actions?
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > Not sure I understand what you mean by web actions.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > > TBH.. i've always wanted a cordova platform add web...
> but
> > > i'd
> > > > be
> > > > > > > happy
> > > > > > > > > > enough with a prepare for browser only mode.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > `cordova platform add web` is part of the plan.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.)
> where
> > > > there
> > > > > > are
> > > > > > > > JS,
> > > > > > > > > > iOS & Android SDKs and a Cordova Plugin wants to support
> > the
> > > > same
> > > > > > API
> > > > > > > > on
> > > > > > > > > > all platforms.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > Didn't think of that but it is applicable indeed.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
> > > > > anis.kadri@gmail.com>
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Ok cool. I can look at adding a --browserify option for
> > run
> > > > and
> > > > > > > > > prepare.
> > > > > > > > > > I
> > > > > > > > > > > logged an issue for it [1]
> > > > > > > > > > >
> > > > > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> > > > > > > agrieve@chromium.org
> > > > > > > > >
> > > > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > Thanks Anis!
> > > > > > > > > > > >
> > > > > > > > > > > > Tougher for CLI since it's actually the prepare step
> > that
> > > > > > creates
> > > > > > > > > > > > cordova_plugins.js, but longer term (medium term?) I
> > > don't
> > > > > see
> > > > > > > why
> > > > > > > > we
> > > > > > > > > > > > shouldn't just turn it on always anyways.
> > > > > > > > > > > >
> > > > > > > > > > > > So... Maybe cordova prepare --browserify?
> > > > > > > > > > > > Build prepares first, so will also need: cordova run
> > > > android
> > > > > > > > > > --browserify
> > > > > > > > > > > >
> > > > > > > > > > > > I haven't looked at it yet. Google IO is next week
> and
> > > it's
> > > > > > been
> > > > > > > > > > > consuming
> > > > > > > > > > > > most of our time the last few weeks. Will definitely
> > play
> > > > > with
> > > > > > it
> > > > > > > > > next
> > > > > > > > > > > next
> > > > > > > > > > > > week though!
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> > > > > > > anis.kadri@gmail.com>
> > > > > > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > >> Sorry. I forgot you asked the question. There was no
> > > issue
> > > > > but
> > > > > > > > there
> > > > > > > > > > is
> > > > > > > > > > > >> one now.
> > > > > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > > > > > > > >>
> > > > > > > > > > > >> This "feature" is plugman only for now. How
> important
> > is
> > > > it
> > > > > to
> > > > > > > > wire
> > > > > > > > > it
> > > > > > > > > > > >> to CLI ? Have  you guys had time to test it out yet
> ?
> > > How
> > > > > > would
> > > > > > > it
> > > > > > > > > > > >> work with CLI ? Add another flag such as "cordova
> > plugin
> > > > add
> > > > > > > > > > > >> --browserify" ?
> > > > > > > > > > > >>
> > > > > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > > > > > > > agrieve@chromium.org>
> > > > > > > > > > > >> wrote:
> > > > > > > > > > > >> > bump
> > > > > > > > > > > >> >
> > > > > > > > > > > >> >
> > > > > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > > > > > > > > agrieve@chromium.org
> > > > > > > > > > > >
> > > > > > > > > > > >> > wrote:
> > > > > > > > > > > >> >>
> > > > > > > > > > > >> >> Cool, yes! Thanks for the update!
> > > > > > > > > > > >> >>
> > > > > > > > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > > > > > > > >> >>
> > > > > > > > > > > >> >>
> > > > > > > > > > > >> >>
> > > > > > > > > > > >> >>
> > > > > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > > > > > > > > mmocny@chromium.org>
> > > > > > > > > > > >> >> wrote:
> > > > > > > > > > > >> >>>
> > > > > > > > > > > >> >>> Awesome Anis.
> > > > > > > > > > > >> >>>
> > > > > > > > > > > >> >>> Will gladly take a look at this later today.
> Just
> > > > > wanted
> > > > > > to
> > > > > > > > > send
> > > > > > > > > > a
> > > > > > > > > > > >> quick
> > > > > > > > > > > >> >>> thanks for landing this this way, and for the
> > useful
> > > > > > report.
> > > > > > > > > > > >> >>>
> > > > > > > > > > > >> >>> -Michal
> > > > > > > > > > > >> >>>
> > > > > > > > > > > >> >>>
> > > > > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > > > > > > > anis.kadri@gmail.com
> > > > > > > > > > >
> > > > > > > > > > > >> wrote:
> > > > > > > > > > > >> >>>
> > > > > > > > > > > >> >>> > Yo,
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>> > Just wanted to let everyone know that I added
> > > > > browserify
> > > > > > > > > support
> > > > > > > > > > > to
> > > > > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not
> > hooked
> > > > to
> > > > > > this
> > > > > > > > > yet.
> > > > > > > > > > > Here
> > > > > > > > > > > >> >>> > is how it works:
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
> > > > > > --platform
> > > > > > > > > > > [PLATFORM]
> > > > > > > > > > > >> >>> > --project [PROJECT_PATH]
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>> > will generate a browserify version of
> > cordova.js.
> > > > > > Plugins
> > > > > > > > and
> > > > > > > > > > > >> >>> > everything is bundled in. This version passes
> > > > > > mobile-spec
> > > > > > > on
> > > > > > > > > iOS
> > > > > > > > > > > and
> > > > > > > > > > > >> >>> > Android. I am not yet setup to test other
> > > platforms.
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
> > > > > [PLATFORM]
> > > > > > > > > > --project
> > > > > > > > > > > >> >>> > [PROJECT_PATH]
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>> > Will continue to generate cordova.js the way
> it
> > > used
> > > > > to.
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>> > Because some of you really care about
> benchmarks
> > > > here
> > > > > is
> > > > > > > > some
> > > > > > > > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>> > No browserify:
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>> > real 0m9.546s
> > > > > > > > > > > >> >>> > user 0m4.673s
> > > > > > > > > > > >> >>> > sys 0m0.692s
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>> > Browserify:
> > > > > > > > > > > >> >>> > real 0m9.861s
> > > > > > > > > > > >> >>> > user 0m4.759s
> > > > > > > > > > > >> >>> > sys 0m0.648s
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>> > All cordova-lib tests are passing so I am
> > assuming
> > > > > this
> > > > > > > has
> > > > > > > > > > > minimal
> > > > > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>> > Anis
> > > > > > > > > > > >> >>> >
> > > > > > > > > > > >> >>
> > > > > > > > > > > >> >>
> > > > > > > > > > > >> >
> > > > > > > > > > > >>
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
> > > > http://www.wizcorp.jp/>
> > > > > > > > > > ------------------------------
> > > > > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
> > > > Website
> > > > > > > > > > <http://www.wizcorp.jp/> | Twitter <
> > > > https://twitter.com/Wizcorp>
> > > > > |
> > > > > > > > > > Facebook
> > > > > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > > > > ------------------------------
> > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > > > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp>
> |
> > > > > > Facebook
> > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Browserify JS is in

Posted by Anis KADRI <an...@gmail.com>.
On Thu, Dec 11, 2014 at 1:45 PM, Michal Mocny <mm...@chromium.org> wrote:
>
> 25MB is for the one-time cordova-cli install, and not overhead for the
> app.  Its not perfect but not a blocker imho.
>
> There are more troubling things about the change than the size overhead:
> - I don't think browserify has "baked" at all.  It was landed behind a
> flag, but is it actually used anywhere?
> - Why browserify and not webpack (aside: its 13Mb..)?  Was it compared at
> all..
> - Last time it was discussed, there were still several breaking changes for
> plugins.  Were they resolved?
>
> Anyway, how can we get data on the change to see if it is positive?:
> - Existing plugins continue to work (We run mobile spec, and get downstream
> distributions run tests on their plugins).
> - Startup time is not negatively affected.
> - Build/prepare time is not negatively affected.
>
> Is that fair?
>

Absolutely totally fair. Those are valid concerns.

I tried the core plugins and they all work and all pass mobile-spec. I know
you guys (ab)use require('./Module') a lot in chrome plugins but they
should still all pass. I actually would be curious to know the results.
Startup should be faster because it is not XHRing a different file to get a
list of plugins to <script> inject them. I actually didn't benchmark this
but it would be interesting.
Build time is slowed down by a few ms (re-read the first email of this
thread).

>
> -Michal
>
> On Thu, Dec 11, 2014 at 2:38 PM, Andrew Grieve <ag...@chromium.org>
> wrote:
>
> > I'd really like to get it fully spelled out *why* browserify is the right
> > tool for this. Some thoughts below:
> >
> > On Wed, Dec 10, 2014 at 8:35 PM, Brian LeRoux <b...@brian.io> wrote:
> >
> > > we should move browserify to main and drop that insane concat code
> > >
> > > its not heavyweight at all. it creates a hash in iife with deps mapped
> > > in…as to why dep mgmt is better than concatenating…I don't think we
> need
> > to
> > > waste our time talking about that!
> >
> >
> >
> > What makes the concat code insane?
> >  - It's easy to understand and make changes to
> >  - It seems to work fine and is quite stable
> >  - It has no dependencies (it's 52kb within cordova-js/tasks/lib)
> >
> > Browserify seems a bit scary to me:
> > - It's 25MB and has a tonne of dependencies
> > - Do we really need all of that functionality?
> >
> > I think it would actually help a lot to talk about dependency management.
> > - Right now cordova-js creates a module for every file in src/
> > - Plugins list each module explicitly in their plugin.xml
> > With browserify, are you envisioning that this model change at all?
> >
> >
> > Why change anything?
> > - cordova-lib should concat plugin modules with cordova.js on prepare
> (this
> > is the motivation stated in the JIRA. totally on board with this!)
> > What else would I like to see changed?
> > - exec.js (and any other platform-specific modules) should move to live
> in
> > platform repos
> >   - This will make code changes that affect both much easier
> > - Platforms should depend on cordova-js via package.json and snapshot
> > generation should happen in bin/create as well as plugin add/rm
> >   - This will remove the (somewhat) annoying step of snapshotting
> >   - This will allow cordova-js to be released as it's own artifact
> >     - Good because we can do things like add Promise polyfill and not
> need
> > to release all platforms to pick it up
> >     - A bit annoying since it's one more thing to release, but likely
> won't
> > get released often.
> >
> >
> > Please don't look at my email as trying to derail the work Anis did. I
> > believe most of it is necessary to accomplish these goals whether we use
> > Browserify, our own, or some other concattenator. I just question whether
> > 25MB is too much complexity for what we need / want.
> >
> >
> >
> >
> > On Thu, Dec 11, 2014 at 2:10 PM, Joe Bowser <bo...@gmail.com> wrote:
> >
> > > This should be a major, but yeah, I'm fine with making this the
> default.
> > >
> > > On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
> > >
> > > > so I think this has baked long enough! lets make it the default and
> > suss
> > > > the bugs.
> > > >
> > > > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <ao...@wizcorp.jp>
> > > wrote:
> > > >
> > > > > Ace, look forward to browser/web as platform. Combined Web and
> Native
> > > API
> > > > > plugin for Cordova! Yay!
> > > > > Thanks for the clarification Michal.
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com>
> > > wrote:
> > > > >
> > > > > > Right, browserify is just a way to package cordova.js that should
> > > make
> > > > it
> > > > > > easier to add the browser as a platform so might not be directly
> > > > related
> > > > > > but is somewhat related :-}
> > > > > >
> > > > > >
> > > > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <
> mmocny@chromium.org>
> > > > > wrote:
> > > > > >
> > > > > > > I think Ally may be confusing what this does?: This browserify
> > work
> > > > is
> > > > > > not
> > > > > > > a way to get cordova to run in a desktop browser, its just a
> > means
> > > > for
> > > > > > > packaging cordova.js.  I think there should be no visible
> change
> > to
> > > > end
> > > > > > > users.
> > > > > > >
> > > > > > > There is a separate effort to target the browser as a platform,
> > and
> > > > it
> > > > > > may
> > > > > > > be true that the browserify work helps with that, but its not
> > > > directly
> > > > > > > related.
> > > > > > >
> > > > > > >
> > > > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <
> anis.kadri@gmail.com
> > >
> > > > > wrote:
> > > > > > >
> > > > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
> > > aogilvie@wizcorp.jp
> > > > >
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Anis that is really sweet.
> > > > > > > > > If this hits CLI, plugin.xml will have sections for plugins
> > to
> > > do
> > > > > web
> > > > > > > > > actions?
> > > > > > > > >
> > > > > > > >
> > > > > > > > Not sure I understand what you mean by web actions.
> > > > > > > >
> > > > > > > >
> > > > > > > > > TBH.. i've always wanted a cordova platform add web... but
> > i'd
> > > be
> > > > > > happy
> > > > > > > > > enough with a prepare for browser only mode.
> > > > > > > > >
> > > > > > > >
> > > > > > > > `cordova platform add web` is part of the plan.
> > > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where
> > > there
> > > > > are
> > > > > > > JS,
> > > > > > > > > iOS & Android SDKs and a Cordova Plugin wants to support
> the
> > > same
> > > > > API
> > > > > > > on
> > > > > > > > > all platforms.
> > > > > > > > >
> > > > > > > >
> > > > > > > > Didn't think of that but it is applicable indeed.
> > > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
> > > > anis.kadri@gmail.com>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Ok cool. I can look at adding a --browserify option for
> run
> > > and
> > > > > > > > prepare.
> > > > > > > > > I
> > > > > > > > > > logged an issue for it [1]
> > > > > > > > > >
> > > > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> > > > > > agrieve@chromium.org
> > > > > > > >
> > > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Thanks Anis!
> > > > > > > > > > >
> > > > > > > > > > > Tougher for CLI since it's actually the prepare step
> that
> > > > > creates
> > > > > > > > > > > cordova_plugins.js, but longer term (medium term?) I
> > don't
> > > > see
> > > > > > why
> > > > > > > we
> > > > > > > > > > > shouldn't just turn it on always anyways.
> > > > > > > > > > >
> > > > > > > > > > > So... Maybe cordova prepare --browserify?
> > > > > > > > > > > Build prepares first, so will also need: cordova run
> > > android
> > > > > > > > > --browserify
> > > > > > > > > > >
> > > > > > > > > > > I haven't looked at it yet. Google IO is next week and
> > it's
> > > > > been
> > > > > > > > > > consuming
> > > > > > > > > > > most of our time the last few weeks. Will definitely
> play
> > > > with
> > > > > it
> > > > > > > > next
> > > > > > > > > > next
> > > > > > > > > > > week though!
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> > > > > > anis.kadri@gmail.com>
> > > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > >> Sorry. I forgot you asked the question. There was no
> > issue
> > > > but
> > > > > > > there
> > > > > > > > > is
> > > > > > > > > > >> one now.
> > > > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > > > > > > >>
> > > > > > > > > > >> This "feature" is plugman only for now. How important
> is
> > > it
> > > > to
> > > > > > > wire
> > > > > > > > it
> > > > > > > > > > >> to CLI ? Have  you guys had time to test it out yet ?
> > How
> > > > > would
> > > > > > it
> > > > > > > > > > >> work with CLI ? Add another flag such as "cordova
> plugin
> > > add
> > > > > > > > > > >> --browserify" ?
> > > > > > > > > > >>
> > > > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > > > > > > agrieve@chromium.org>
> > > > > > > > > > >> wrote:
> > > > > > > > > > >> > bump
> > > > > > > > > > >> >
> > > > > > > > > > >> >
> > > > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > > > > > > > agrieve@chromium.org
> > > > > > > > > > >
> > > > > > > > > > >> > wrote:
> > > > > > > > > > >> >>
> > > > > > > > > > >> >> Cool, yes! Thanks for the update!
> > > > > > > > > > >> >>
> > > > > > > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > > > > > > >> >>
> > > > > > > > > > >> >>
> > > > > > > > > > >> >>
> > > > > > > > > > >> >>
> > > > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > > > > > > > mmocny@chromium.org>
> > > > > > > > > > >> >> wrote:
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>> Awesome Anis.
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>> Will gladly take a look at this later today.  Just
> > > > wanted
> > > > > to
> > > > > > > > send
> > > > > > > > > a
> > > > > > > > > > >> quick
> > > > > > > > > > >> >>> thanks for landing this this way, and for the
> useful
> > > > > report.
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>> -Michal
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > > > > > > anis.kadri@gmail.com
> > > > > > > > > >
> > > > > > > > > > >> wrote:
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>> > Yo,
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > Just wanted to let everyone know that I added
> > > > browserify
> > > > > > > > support
> > > > > > > > > > to
> > > > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not
> hooked
> > > to
> > > > > this
> > > > > > > > yet.
> > > > > > > > > > Here
> > > > > > > > > > >> >>> > is how it works:
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
> > > > > --platform
> > > > > > > > > > [PLATFORM]
> > > > > > > > > > >> >>> > --project [PROJECT_PATH]
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > will generate a browserify version of
> cordova.js.
> > > > > Plugins
> > > > > > > and
> > > > > > > > > > >> >>> > everything is bundled in. This version passes
> > > > > mobile-spec
> > > > > > on
> > > > > > > > iOS
> > > > > > > > > > and
> > > > > > > > > > >> >>> > Android. I am not yet setup to test other
> > platforms.
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
> > > > [PLATFORM]
> > > > > > > > > --project
> > > > > > > > > > >> >>> > [PROJECT_PATH]
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > Will continue to generate cordova.js the way it
> > used
> > > > to.
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > Because some of you really care about benchmarks
> > > here
> > > > is
> > > > > > > some
> > > > > > > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > No browserify:
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > real 0m9.546s
> > > > > > > > > > >> >>> > user 0m4.673s
> > > > > > > > > > >> >>> > sys 0m0.692s
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > Browserify:
> > > > > > > > > > >> >>> > real 0m9.861s
> > > > > > > > > > >> >>> > user 0m4.759s
> > > > > > > > > > >> >>> > sys 0m0.648s
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > All cordova-lib tests are passing so I am
> assuming
> > > > this
> > > > > > has
> > > > > > > > > > minimal
> > > > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > Anis
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>
> > > > > > > > > > >> >>
> > > > > > > > > > >> >
> > > > > > > > > > >>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
> > > http://www.wizcorp.jp/>
> > > > > > > > > ------------------------------
> > > > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
> > > Website
> > > > > > > > > <http://www.wizcorp.jp/> | Twitter <
> > > https://twitter.com/Wizcorp>
> > > > |
> > > > > > > > > Facebook
> > > > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > > > ------------------------------
> > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > > > > Facebook
> > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > <http://www.linkedin.com/company/wizcorp>
> > > > >
> > > >
> > >
> >
>

Re: Browserify JS is in

Posted by Brian LeRoux <b...@brian.io>.
I've vetted webpack (and the rest) extensively. Less ecosystem. More
complex config. No transforms.

Here's a thing I wrote on the modules front. Not directly applicable but
possibly relevant and at worst geek entertaining. ;)

https://medium.com/@brianleroux/es6-modules-amd-and-commonjs-c1acefbe6fc0


On Thu, Dec 11, 2014 at 2:11 PM, Steven Gill <st...@gmail.com> wrote:

> Realized I wasn't clear, but startup/run time is definitely faster. One of
> the benefits of switching to a system like this.
>
> Build time is a few ms slower.
>
> On Thu, Dec 11, 2014 at 2:06 PM, Steven Gill <st...@gmail.com>
> wrote:
>
> >
> >
> > On Thu, Dec 11, 2014 at 1:45 PM, Michal Mocny <mm...@chromium.org>
> wrote:
> >
> >> 25MB is for the one-time cordova-cli install, and not overhead for the
> >> app.  Its not perfect but not a blocker imho.
> >>
> >
> > Agreed
> >
> >
> >> There are more troubling things about the change than the size overhead:
> >> - I don't think browserify has "baked" at all.  It was landed behind a
> >> flag, but is it actually used anywhere?
> >
> > - Why browserify and not webpack (aside: its 13Mb..)?  Was it compared at
> >> all..
> >>
> >
> > Not sure. I am unfamiliar with webpack.
> >
> > But one is integrated into our system...
> >
> > The node community are big backers of browserify. It had a dedicated
> track
> > at JSFEST this week. Not suggesting popularity be the deciding factor
> > though :P
> >
> >
> >
> >> - Last time it was discussed, there were still several breaking changes
> >> for
> >> plugins.  Were they resolved?
> >>
> >> Yes. Transforms were used to deal with the issues.
> >
> >
> >> Anyway, how can we get data on the change to see if it is positive?:
> >> - Existing plugins continue to work (We run mobile spec, and get
> >> downstream
> >> distributions run tests on their plugins).
> >>
> >
> > Android and IOS had same success rate on mobile spec for browserify
> system
> > last time I tested. Need to do more tests with other platforms. Seems one
> > way to get platforms to test it is to make default + fix any problems we
> > see before releasing
> >
> > - Startup time is not negatively affected.
> >>
> >
> > Current system we have to read cordova_plugins at runtime. Browserify
> > handles this at build time so I would imagine it would speed up that
> part.
> > Flip side, all the plugins get executed immediately with browserify (has
> > benefits too).
> >
> > - Build/prepare time is not negatively affected.
> >
> >
> >> Is that fair?
> >>
> >> -Michal
> >>
> >> On Thu, Dec 11, 2014 at 2:38 PM, Andrew Grieve <ag...@chromium.org>
> >> wrote:
> >>
> >> > I'd really like to get it fully spelled out *why* browserify is the
> >> right
> >> > tool for this. Some thoughts below:
> >> >
> >> > On Wed, Dec 10, 2014 at 8:35 PM, Brian LeRoux <b...@brian.io> wrote:
> >> >
> >> > > we should move browserify to main and drop that insane concat code
> >> > >
> >> > > its not heavyweight at all. it creates a hash in iife with deps
> mapped
> >> > > in...as to why dep mgmt is better than concatenating...I don't
> think we
> >> need
> >> > to
> >> > > waste our time talking about that!
> >> >
> >> >
> >> >
> >> > What makes the concat code insane?
> >> >  - It's easy to understand and make changes to
> >> >  - It seems to work fine and is quite stable
> >> >  - It has no dependencies (it's 52kb within cordova-js/tasks/lib)
> >> >
> >> > Browserify seems a bit scary to me:
> >> > - It's 25MB and has a tonne of dependencies
> >> > - Do we really need all of that functionality?
> >> >
> >> > I think it would actually help a lot to talk about dependency
> >> management.
> >> > - Right now cordova-js creates a module for every file in src/
> >> > - Plugins list each module explicitly in their plugin.xml
> >> > With browserify, are you envisioning that this model change at all?
> >> >
> >> >
> >> > Why change anything?
> >> > - cordova-lib should concat plugin modules with cordova.js on prepare
> >> (this
> >> > is the motivation stated in the JIRA. totally on board with this!)
> >> > What else would I like to see changed?
> >> > - exec.js (and any other platform-specific modules) should move to
> live
> >> in
> >> > platform repos
> >> >   - This will make code changes that affect both much easier
> >> > - Platforms should depend on cordova-js via package.json and snapshot
> >> > generation should happen in bin/create as well as plugin add/rm
> >> >   - This will remove the (somewhat) annoying step of snapshotting
> >> >   - This will allow cordova-js to be released as it's own artifact
> >> >     - Good because we can do things like add Promise polyfill and not
> >> need
> >> > to release all platforms to pick it up
> >> >     - A bit annoying since it's one more thing to release, but likely
> >> won't
> >> > get released often.
> >> >
> >> >
> >> > Please don't look at my email as trying to derail the work Anis did. I
> >> > believe most of it is necessary to accomplish these goals whether we
> use
> >> > Browserify, our own, or some other concattenator. I just question
> >> whether
> >> > 25MB is too much complexity for what we need / want.
> >> >
> >> >
> >> >
> >> >
> >> > On Thu, Dec 11, 2014 at 2:10 PM, Joe Bowser <bo...@gmail.com>
> wrote:
> >> >
> >> > > This should be a major, but yeah, I'm fine with making this the
> >> default.
> >> > >
> >> > > On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
> >> > >
> >> > > > so I think this has baked long enough! lets make it the default
> and
> >> > suss
> >> > > > the bugs.
> >> > > >
> >> > > > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <
> aogilvie@wizcorp.jp>
> >> > > wrote:
> >> > > >
> >> > > > > Ace, look forward to browser/web as platform. Combined Web and
> >> Native
> >> > > API
> >> > > > > plugin for Cordova! Yay!
> >> > > > > Thanks for the clarification Michal.
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <
> anis.kadri@gmail.com>
> >> > > wrote:
> >> > > > >
> >> > > > > > Right, browserify is just a way to package cordova.js that
> >> should
> >> > > make
> >> > > > it
> >> > > > > > easier to add the browser as a platform so might not be
> directly
> >> > > > related
> >> > > > > > but is somewhat related :-}
> >> > > > > >
> >> > > > > >
> >> > > > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <
> >> mmocny@chromium.org>
> >> > > > > wrote:
> >> > > > > >
> >> > > > > > > I think Ally may be confusing what this does?: This
> browserify
> >> > work
> >> > > > is
> >> > > > > > not
> >> > > > > > > a way to get cordova to run in a desktop browser, its just a
> >> > means
> >> > > > for
> >> > > > > > > packaging cordova.js.  I think there should be no visible
> >> change
> >> > to
> >> > > > end
> >> > > > > > > users.
> >> > > > > > >
> >> > > > > > > There is a separate effort to target the browser as a
> >> platform,
> >> > and
> >> > > > it
> >> > > > > > may
> >> > > > > > > be true that the browserify work helps with that, but its
> not
> >> > > > directly
> >> > > > > > > related.
> >> > > > > > >
> >> > > > > > >
> >> > > > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <
> >> anis.kadri@gmail.com
> >> > >
> >> > > > > wrote:
> >> > > > > > >
> >> > > > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
> >> > > aogilvie@wizcorp.jp
> >> > > > >
> >> > > > > > > wrote:
> >> > > > > > > >
> >> > > > > > > > > Anis that is really sweet.
> >> > > > > > > > > If this hits CLI, plugin.xml will have sections for
> >> plugins
> >> > to
> >> > > do
> >> > > > > web
> >> > > > > > > > > actions?
> >> > > > > > > > >
> >> > > > > > > >
> >> > > > > > > > Not sure I understand what you mean by web actions.
> >> > > > > > > >
> >> > > > > > > >
> >> > > > > > > > > TBH.. i've always wanted a cordova platform add web...
> but
> >> > i'd
> >> > > be
> >> > > > > > happy
> >> > > > > > > > > enough with a prepare for browser only mode.
> >> > > > > > > > >
> >> > > > > > > >
> >> > > > > > > > `cordova platform add web` is part of the plan.
> >> > > > > > > >
> >> > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.)
> >> where
> >> > > there
> >> > > > > are
> >> > > > > > > JS,
> >> > > > > > > > > iOS & Android SDKs and a Cordova Plugin wants to support
> >> the
> >> > > same
> >> > > > > API
> >> > > > > > > on
> >> > > > > > > > > all platforms.
> >> > > > > > > > >
> >> > > > > > > >
> >> > > > > > > > Didn't think of that but it is applicable indeed.
> >> > > > > > > >
> >> > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
> >> > > > anis.kadri@gmail.com>
> >> > > > > > > > wrote:
> >> > > > > > > > >
> >> > > > > > > > > > Ok cool. I can look at adding a --browserify option
> for
> >> run
> >> > > and
> >> > > > > > > > prepare.
> >> > > > > > > > > I
> >> > > > > > > > > > logged an issue for it [1]
> >> > > > > > > > > >
> >> > > > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> >> > > > > > > > > >
> >> > > > > > > > > >
> >> > > > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> >> > > > > > agrieve@chromium.org
> >> > > > > > > >
> >> > > > > > > > > > wrote:
> >> > > > > > > > > >
> >> > > > > > > > > > > Thanks Anis!
> >> > > > > > > > > > >
> >> > > > > > > > > > > Tougher for CLI since it's actually the prepare step
> >> that
> >> > > > > creates
> >> > > > > > > > > > > cordova_plugins.js, but longer term (medium term?) I
> >> > don't
> >> > > > see
> >> > > > > > why
> >> > > > > > > we
> >> > > > > > > > > > > shouldn't just turn it on always anyways.
> >> > > > > > > > > > >
> >> > > > > > > > > > > So... Maybe cordova prepare --browserify?
> >> > > > > > > > > > > Build prepares first, so will also need: cordova run
> >> > > android
> >> > > > > > > > > --browserify
> >> > > > > > > > > > >
> >> > > > > > > > > > > I haven't looked at it yet. Google IO is next week
> and
> >> > it's
> >> > > > > been
> >> > > > > > > > > > consuming
> >> > > > > > > > > > > most of our time the last few weeks. Will definitely
> >> play
> >> > > > with
> >> > > > > it
> >> > > > > > > > next
> >> > > > > > > > > > next
> >> > > > > > > > > > > week though!
> >> > > > > > > > > > >
> >> > > > > > > > > > >
> >> > > > > > > > > > >
> >> > > > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> >> > > > > > anis.kadri@gmail.com>
> >> > > > > > > > > > wrote:
> >> > > > > > > > > > >
> >> > > > > > > > > > >> Sorry. I forgot you asked the question. There was
> no
> >> > issue
> >> > > > but
> >> > > > > > > there
> >> > > > > > > > > is
> >> > > > > > > > > > >> one now.
> >> > > > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> >> > > > > > > > > > >>
> >> > > > > > > > > > >> This "feature" is plugman only for now. How
> >> important is
> >> > > it
> >> > > > to
> >> > > > > > > wire
> >> > > > > > > > it
> >> > > > > > > > > > >> to CLI ? Have  you guys had time to test it out
> yet ?
> >> > How
> >> > > > > would
> >> > > > > > it
> >> > > > > > > > > > >> work with CLI ? Add another flag such as "cordova
> >> plugin
> >> > > add
> >> > > > > > > > > > >> --browserify" ?
> >> > > > > > > > > > >>
> >> > > > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> >> > > > > > > > agrieve@chromium.org>
> >> > > > > > > > > > >> wrote:
> >> > > > > > > > > > >> > bump
> >> > > > > > > > > > >> >
> >> > > > > > > > > > >> >
> >> > > > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> >> > > > > > > > > agrieve@chromium.org
> >> > > > > > > > > > >
> >> > > > > > > > > > >> > wrote:
> >> > > > > > > > > > >> >>
> >> > > > > > > > > > >> >> Cool, yes! Thanks for the update!
> >> > > > > > > > > > >> >>
> >> > > > > > > > > > >> >> Is there a JIRA for this? Was asked in
> >> > > > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> >> > > > > > > > > > >> >>
> >> > > > > > > > > > >> >>
> >> > > > > > > > > > >> >>
> >> > > > > > > > > > >> >>
> >> > > > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> >> > > > > > > > > mmocny@chromium.org>
> >> > > > > > > > > > >> >> wrote:
> >> > > > > > > > > > >> >>>
> >> > > > > > > > > > >> >>> Awesome Anis.
> >> > > > > > > > > > >> >>>
> >> > > > > > > > > > >> >>> Will gladly take a look at this later today.
> >> Just
> >> > > > wanted
> >> > > > > to
> >> > > > > > > > send
> >> > > > > > > > > a
> >> > > > > > > > > > >> quick
> >> > > > > > > > > > >> >>> thanks for landing this this way, and for the
> >> useful
> >> > > > > report.
> >> > > > > > > > > > >> >>>
> >> > > > > > > > > > >> >>> -Michal
> >> > > > > > > > > > >> >>>
> >> > > > > > > > > > >> >>>
> >> > > > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> >> > > > > > > > anis.kadri@gmail.com
> >> > > > > > > > > >
> >> > > > > > > > > > >> wrote:
> >> > > > > > > > > > >> >>>
> >> > > > > > > > > > >> >>> > Yo,
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>> > Just wanted to let everyone know that I added
> >> > > > browserify
> >> > > > > > > > support
> >> > > > > > > > > > to
> >> > > > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not
> >> hooked
> >> > > to
> >> > > > > this
> >> > > > > > > > yet.
> >> > > > > > > > > > Here
> >> > > > > > > > > > >> >>> > is how it works:
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>> > plugman install --browserify --plugin
> [PLUGIN]
> >> > > > > --platform
> >> > > > > > > > > > [PLATFORM]
> >> > > > > > > > > > >> >>> > --project [PROJECT_PATH]
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>> > will generate a browserify version of
> >> cordova.js.
> >> > > > > Plugins
> >> > > > > > > and
> >> > > > > > > > > > >> >>> > everything is bundled in. This version passes
> >> > > > > mobile-spec
> >> > > > > > on
> >> > > > > > > > iOS
> >> > > > > > > > > > and
> >> > > > > > > > > > >> >>> > Android. I am not yet setup to test other
> >> > platforms.
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
> >> > > > [PLATFORM]
> >> > > > > > > > > --project
> >> > > > > > > > > > >> >>> > [PROJECT_PATH]
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>> > Will continue to generate cordova.js the way
> it
> >> > used
> >> > > > to.
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>> > Because some of you really care about
> >> benchmarks
> >> > > here
> >> > > > is
> >> > > > > > > some
> >> > > > > > > > > > >> >>> > comparison for dependencies-plugin install:
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>> > No browserify:
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>> > real 0m9.546s
> >> > > > > > > > > > >> >>> > user 0m4.673s
> >> > > > > > > > > > >> >>> > sys 0m0.692s
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>> > Browserify:
> >> > > > > > > > > > >> >>> > real 0m9.861s
> >> > > > > > > > > > >> >>> > user 0m4.759s
> >> > > > > > > > > > >> >>> > sys 0m0.648s
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>> > All cordova-lib tests are passing so I am
> >> assuming
> >> > > > this
> >> > > > > > has
> >> > > > > > > > > > minimal
> >> > > > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>> > Anis
> >> > > > > > > > > > >> >>> >
> >> > > > > > > > > > >> >>
> >> > > > > > > > > > >> >>
> >> > > > > > > > > > >> >
> >> > > > > > > > > > >>
> >> > > > > > > > > > >
> >> > > > > > > > > > >
> >> > > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > > --
> >> > > > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> >> > > > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
> >> > > http://www.wizcorp.jp/>
> >> > > > > > > > > ------------------------------
> >> > > > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448
> |
> >> > > Website
> >> > > > > > > > > <http://www.wizcorp.jp/> | Twitter <
> >> > > https://twitter.com/Wizcorp>
> >> > > > |
> >> > > > > > > > > Facebook
> >> > > > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> >> > > > > > > > > <http://www.linkedin.com/company/wizcorp>
> >> > > > > > > > >
> >> > > > > > > >
> >> > > > > > >
> >> > > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > --
> >> > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> >> > > > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/
> >
> >> > > > > ------------------------------
> >> > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
> Website
> >> > > > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp
> >
> >> |
> >> > > > > Facebook
> >> > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> >> > > > > <http://www.linkedin.com/company/wizcorp>
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> >
> >
>

Re: Browserify JS is in

Posted by Steven Gill <st...@gmail.com>.
Realized I wasn't clear, but startup/run time is definitely faster. One of
the benefits of switching to a system like this.

Build time is a few ms slower.

On Thu, Dec 11, 2014 at 2:06 PM, Steven Gill <st...@gmail.com> wrote:

>
>
> On Thu, Dec 11, 2014 at 1:45 PM, Michal Mocny <mm...@chromium.org> wrote:
>
>> 25MB is for the one-time cordova-cli install, and not overhead for the
>> app.  Its not perfect but not a blocker imho.
>>
>
> Agreed
>
>
>> There are more troubling things about the change than the size overhead:
>> - I don't think browserify has "baked" at all.  It was landed behind a
>> flag, but is it actually used anywhere?
>
> - Why browserify and not webpack (aside: its 13Mb..)?  Was it compared at
>> all..
>>
>
> Not sure. I am unfamiliar with webpack.
>
> But one is integrated into our system...
>
> The node community are big backers of browserify. It had a dedicated track
> at JSFEST this week. Not suggesting popularity be the deciding factor
> though :P
>
>
>
>> - Last time it was discussed, there were still several breaking changes
>> for
>> plugins.  Were they resolved?
>>
>> Yes. Transforms were used to deal with the issues.
>
>
>> Anyway, how can we get data on the change to see if it is positive?:
>> - Existing plugins continue to work (We run mobile spec, and get
>> downstream
>> distributions run tests on their plugins).
>>
>
> Android and IOS had same success rate on mobile spec for browserify system
> last time I tested. Need to do more tests with other platforms. Seems one
> way to get platforms to test it is to make default + fix any problems we
> see before releasing
>
> - Startup time is not negatively affected.
>>
>
> Current system we have to read cordova_plugins at runtime. Browserify
> handles this at build time so I would imagine it would speed up that part.
> Flip side, all the plugins get executed immediately with browserify (has
> benefits too).
>
> - Build/prepare time is not negatively affected.
>
>
>> Is that fair?
>>
>> -Michal
>>
>> On Thu, Dec 11, 2014 at 2:38 PM, Andrew Grieve <ag...@chromium.org>
>> wrote:
>>
>> > I'd really like to get it fully spelled out *why* browserify is the
>> right
>> > tool for this. Some thoughts below:
>> >
>> > On Wed, Dec 10, 2014 at 8:35 PM, Brian LeRoux <b...@brian.io> wrote:
>> >
>> > > we should move browserify to main and drop that insane concat code
>> > >
>> > > its not heavyweight at all. it creates a hash in iife with deps mapped
>> > > in...as to why dep mgmt is better than concatenating...I don't think we
>> need
>> > to
>> > > waste our time talking about that!
>> >
>> >
>> >
>> > What makes the concat code insane?
>> >  - It's easy to understand and make changes to
>> >  - It seems to work fine and is quite stable
>> >  - It has no dependencies (it's 52kb within cordova-js/tasks/lib)
>> >
>> > Browserify seems a bit scary to me:
>> > - It's 25MB and has a tonne of dependencies
>> > - Do we really need all of that functionality?
>> >
>> > I think it would actually help a lot to talk about dependency
>> management.
>> > - Right now cordova-js creates a module for every file in src/
>> > - Plugins list each module explicitly in their plugin.xml
>> > With browserify, are you envisioning that this model change at all?
>> >
>> >
>> > Why change anything?
>> > - cordova-lib should concat plugin modules with cordova.js on prepare
>> (this
>> > is the motivation stated in the JIRA. totally on board with this!)
>> > What else would I like to see changed?
>> > - exec.js (and any other platform-specific modules) should move to live
>> in
>> > platform repos
>> >   - This will make code changes that affect both much easier
>> > - Platforms should depend on cordova-js via package.json and snapshot
>> > generation should happen in bin/create as well as plugin add/rm
>> >   - This will remove the (somewhat) annoying step of snapshotting
>> >   - This will allow cordova-js to be released as it's own artifact
>> >     - Good because we can do things like add Promise polyfill and not
>> need
>> > to release all platforms to pick it up
>> >     - A bit annoying since it's one more thing to release, but likely
>> won't
>> > get released often.
>> >
>> >
>> > Please don't look at my email as trying to derail the work Anis did. I
>> > believe most of it is necessary to accomplish these goals whether we use
>> > Browserify, our own, or some other concattenator. I just question
>> whether
>> > 25MB is too much complexity for what we need / want.
>> >
>> >
>> >
>> >
>> > On Thu, Dec 11, 2014 at 2:10 PM, Joe Bowser <bo...@gmail.com> wrote:
>> >
>> > > This should be a major, but yeah, I'm fine with making this the
>> default.
>> > >
>> > > On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
>> > >
>> > > > so I think this has baked long enough! lets make it the default and
>> > suss
>> > > > the bugs.
>> > > >
>> > > > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <ao...@wizcorp.jp>
>> > > wrote:
>> > > >
>> > > > > Ace, look forward to browser/web as platform. Combined Web and
>> Native
>> > > API
>> > > > > plugin for Cordova! Yay!
>> > > > > Thanks for the clarification Michal.
>> > > > >
>> > > > >
>> > > > >
>> > > > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com>
>> > > wrote:
>> > > > >
>> > > > > > Right, browserify is just a way to package cordova.js that
>> should
>> > > make
>> > > > it
>> > > > > > easier to add the browser as a platform so might not be directly
>> > > > related
>> > > > > > but is somewhat related :-}
>> > > > > >
>> > > > > >
>> > > > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <
>> mmocny@chromium.org>
>> > > > > wrote:
>> > > > > >
>> > > > > > > I think Ally may be confusing what this does?: This browserify
>> > work
>> > > > is
>> > > > > > not
>> > > > > > > a way to get cordova to run in a desktop browser, its just a
>> > means
>> > > > for
>> > > > > > > packaging cordova.js.  I think there should be no visible
>> change
>> > to
>> > > > end
>> > > > > > > users.
>> > > > > > >
>> > > > > > > There is a separate effort to target the browser as a
>> platform,
>> > and
>> > > > it
>> > > > > > may
>> > > > > > > be true that the browserify work helps with that, but its not
>> > > > directly
>> > > > > > > related.
>> > > > > > >
>> > > > > > >
>> > > > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <
>> anis.kadri@gmail.com
>> > >
>> > > > > wrote:
>> > > > > > >
>> > > > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
>> > > aogilvie@wizcorp.jp
>> > > > >
>> > > > > > > wrote:
>> > > > > > > >
>> > > > > > > > > Anis that is really sweet.
>> > > > > > > > > If this hits CLI, plugin.xml will have sections for
>> plugins
>> > to
>> > > do
>> > > > > web
>> > > > > > > > > actions?
>> > > > > > > > >
>> > > > > > > >
>> > > > > > > > Not sure I understand what you mean by web actions.
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > > TBH.. i've always wanted a cordova platform add web... but
>> > i'd
>> > > be
>> > > > > > happy
>> > > > > > > > > enough with a prepare for browser only mode.
>> > > > > > > > >
>> > > > > > > >
>> > > > > > > > `cordova platform add web` is part of the plan.
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > >
>> > > > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.)
>> where
>> > > there
>> > > > > are
>> > > > > > > JS,
>> > > > > > > > > iOS & Android SDKs and a Cordova Plugin wants to support
>> the
>> > > same
>> > > > > API
>> > > > > > > on
>> > > > > > > > > all platforms.
>> > > > > > > > >
>> > > > > > > >
>> > > > > > > > Didn't think of that but it is applicable indeed.
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
>> > > > anis.kadri@gmail.com>
>> > > > > > > > wrote:
>> > > > > > > > >
>> > > > > > > > > > Ok cool. I can look at adding a --browserify option for
>> run
>> > > and
>> > > > > > > > prepare.
>> > > > > > > > > I
>> > > > > > > > > > logged an issue for it [1]
>> > > > > > > > > >
>> > > > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
>> > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
>> > > > > > agrieve@chromium.org
>> > > > > > > >
>> > > > > > > > > > wrote:
>> > > > > > > > > >
>> > > > > > > > > > > Thanks Anis!
>> > > > > > > > > > >
>> > > > > > > > > > > Tougher for CLI since it's actually the prepare step
>> that
>> > > > > creates
>> > > > > > > > > > > cordova_plugins.js, but longer term (medium term?) I
>> > don't
>> > > > see
>> > > > > > why
>> > > > > > > we
>> > > > > > > > > > > shouldn't just turn it on always anyways.
>> > > > > > > > > > >
>> > > > > > > > > > > So... Maybe cordova prepare --browserify?
>> > > > > > > > > > > Build prepares first, so will also need: cordova run
>> > > android
>> > > > > > > > > --browserify
>> > > > > > > > > > >
>> > > > > > > > > > > I haven't looked at it yet. Google IO is next week and
>> > it's
>> > > > > been
>> > > > > > > > > > consuming
>> > > > > > > > > > > most of our time the last few weeks. Will definitely
>> play
>> > > > with
>> > > > > it
>> > > > > > > > next
>> > > > > > > > > > next
>> > > > > > > > > > > week though!
>> > > > > > > > > > >
>> > > > > > > > > > >
>> > > > > > > > > > >
>> > > > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
>> > > > > > anis.kadri@gmail.com>
>> > > > > > > > > > wrote:
>> > > > > > > > > > >
>> > > > > > > > > > >> Sorry. I forgot you asked the question. There was no
>> > issue
>> > > > but
>> > > > > > > there
>> > > > > > > > > is
>> > > > > > > > > > >> one now.
>> > > > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
>> > > > > > > > > > >>
>> > > > > > > > > > >> This "feature" is plugman only for now. How
>> important is
>> > > it
>> > > > to
>> > > > > > > wire
>> > > > > > > > it
>> > > > > > > > > > >> to CLI ? Have  you guys had time to test it out yet ?
>> > How
>> > > > > would
>> > > > > > it
>> > > > > > > > > > >> work with CLI ? Add another flag such as "cordova
>> plugin
>> > > add
>> > > > > > > > > > >> --browserify" ?
>> > > > > > > > > > >>
>> > > > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
>> > > > > > > > agrieve@chromium.org>
>> > > > > > > > > > >> wrote:
>> > > > > > > > > > >> > bump
>> > > > > > > > > > >> >
>> > > > > > > > > > >> >
>> > > > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
>> > > > > > > > > agrieve@chromium.org
>> > > > > > > > > > >
>> > > > > > > > > > >> > wrote:
>> > > > > > > > > > >> >>
>> > > > > > > > > > >> >> Cool, yes! Thanks for the update!
>> > > > > > > > > > >> >>
>> > > > > > > > > > >> >> Is there a JIRA for this? Was asked in
>> > > > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
>> > > > > > > > > > >> >>
>> > > > > > > > > > >> >>
>> > > > > > > > > > >> >>
>> > > > > > > > > > >> >>
>> > > > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
>> > > > > > > > > mmocny@chromium.org>
>> > > > > > > > > > >> >> wrote:
>> > > > > > > > > > >> >>>
>> > > > > > > > > > >> >>> Awesome Anis.
>> > > > > > > > > > >> >>>
>> > > > > > > > > > >> >>> Will gladly take a look at this later today.
>> Just
>> > > > wanted
>> > > > > to
>> > > > > > > > send
>> > > > > > > > > a
>> > > > > > > > > > >> quick
>> > > > > > > > > > >> >>> thanks for landing this this way, and for the
>> useful
>> > > > > report.
>> > > > > > > > > > >> >>>
>> > > > > > > > > > >> >>> -Michal
>> > > > > > > > > > >> >>>
>> > > > > > > > > > >> >>>
>> > > > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
>> > > > > > > > anis.kadri@gmail.com
>> > > > > > > > > >
>> > > > > > > > > > >> wrote:
>> > > > > > > > > > >> >>>
>> > > > > > > > > > >> >>> > Yo,
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>> > Just wanted to let everyone know that I added
>> > > > browserify
>> > > > > > > > support
>> > > > > > > > > > to
>> > > > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not
>> hooked
>> > > to
>> > > > > this
>> > > > > > > > yet.
>> > > > > > > > > > Here
>> > > > > > > > > > >> >>> > is how it works:
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
>> > > > > --platform
>> > > > > > > > > > [PLATFORM]
>> > > > > > > > > > >> >>> > --project [PROJECT_PATH]
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>> > will generate a browserify version of
>> cordova.js.
>> > > > > Plugins
>> > > > > > > and
>> > > > > > > > > > >> >>> > everything is bundled in. This version passes
>> > > > > mobile-spec
>> > > > > > on
>> > > > > > > > iOS
>> > > > > > > > > > and
>> > > > > > > > > > >> >>> > Android. I am not yet setup to test other
>> > platforms.
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
>> > > > [PLATFORM]
>> > > > > > > > > --project
>> > > > > > > > > > >> >>> > [PROJECT_PATH]
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>> > Will continue to generate cordova.js the way it
>> > used
>> > > > to.
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>> > Because some of you really care about
>> benchmarks
>> > > here
>> > > > is
>> > > > > > > some
>> > > > > > > > > > >> >>> > comparison for dependencies-plugin install:
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>> > No browserify:
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>> > real 0m9.546s
>> > > > > > > > > > >> >>> > user 0m4.673s
>> > > > > > > > > > >> >>> > sys 0m0.692s
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>> > Browserify:
>> > > > > > > > > > >> >>> > real 0m9.861s
>> > > > > > > > > > >> >>> > user 0m4.759s
>> > > > > > > > > > >> >>> > sys 0m0.648s
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>> > All cordova-lib tests are passing so I am
>> assuming
>> > > > this
>> > > > > > has
>> > > > > > > > > > minimal
>> > > > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>> > Anis
>> > > > > > > > > > >> >>> >
>> > > > > > > > > > >> >>
>> > > > > > > > > > >> >>
>> > > > > > > > > > >> >
>> > > > > > > > > > >>
>> > > > > > > > > > >
>> > > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > --
>> > > > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
>> > > > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
>> > > http://www.wizcorp.jp/>
>> > > > > > > > > ------------------------------
>> > > > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
>> > > Website
>> > > > > > > > > <http://www.wizcorp.jp/> | Twitter <
>> > > https://twitter.com/Wizcorp>
>> > > > |
>> > > > > > > > > Facebook
>> > > > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
>> > > > > > > > > <http://www.linkedin.com/company/wizcorp>
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > --
>> > > > > <http://www.wizcorp.jp/>Ally Ogilvie
>> > > > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
>> > > > > ------------------------------
>> > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
>> > > > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp>
>> |
>> > > > > Facebook
>> > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
>> > > > > <http://www.linkedin.com/company/wizcorp>
>> > > > >
>> > > >
>> > >
>> >
>>
>
>

Re: Browserify JS is in

Posted by Steven Gill <st...@gmail.com>.
On Thu, Dec 11, 2014 at 1:45 PM, Michal Mocny <mm...@chromium.org> wrote:

> 25MB is for the one-time cordova-cli install, and not overhead for the
> app.  Its not perfect but not a blocker imho.
>

Agreed


> There are more troubling things about the change than the size overhead:
> - I don't think browserify has "baked" at all.  It was landed behind a
> flag, but is it actually used anywhere?

- Why browserify and not webpack (aside: its 13Mb..)?  Was it compared at
> all..
>

Not sure. I am unfamiliar with webpack.

But one is integrated into our system...

The node community are big backers of browserify. It had a dedicated track
at JSFEST this week. Not suggesting popularity be the deciding factor
though :P



> - Last time it was discussed, there were still several breaking changes for
> plugins.  Were they resolved?
>
> Yes. Transforms were used to deal with the issues.


> Anyway, how can we get data on the change to see if it is positive?:
> - Existing plugins continue to work (We run mobile spec, and get downstream
> distributions run tests on their plugins).
>

Android and IOS had same success rate on mobile spec for browserify system
last time I tested. Need to do more tests with other platforms. Seems one
way to get platforms to test it is to make default + fix any problems we
see before releasing

- Startup time is not negatively affected.
>

Current system we have to read cordova_plugins at runtime. Browserify
handles this at build time so I would imagine it would speed up that part.
Flip side, all the plugins get executed immediately with browserify (has
benefits too).

- Build/prepare time is not negatively affected.


> Is that fair?
>
> -Michal
>
> On Thu, Dec 11, 2014 at 2:38 PM, Andrew Grieve <ag...@chromium.org>
> wrote:
>
> > I'd really like to get it fully spelled out *why* browserify is the right
> > tool for this. Some thoughts below:
> >
> > On Wed, Dec 10, 2014 at 8:35 PM, Brian LeRoux <b...@brian.io> wrote:
> >
> > > we should move browserify to main and drop that insane concat code
> > >
> > > its not heavyweight at all. it creates a hash in iife with deps mapped
> > > in...as to why dep mgmt is better than concatenating...I don't think we
> need
> > to
> > > waste our time talking about that!
> >
> >
> >
> > What makes the concat code insane?
> >  - It's easy to understand and make changes to
> >  - It seems to work fine and is quite stable
> >  - It has no dependencies (it's 52kb within cordova-js/tasks/lib)
> >
> > Browserify seems a bit scary to me:
> > - It's 25MB and has a tonne of dependencies
> > - Do we really need all of that functionality?
> >
> > I think it would actually help a lot to talk about dependency management.
> > - Right now cordova-js creates a module for every file in src/
> > - Plugins list each module explicitly in their plugin.xml
> > With browserify, are you envisioning that this model change at all?
> >
> >
> > Why change anything?
> > - cordova-lib should concat plugin modules with cordova.js on prepare
> (this
> > is the motivation stated in the JIRA. totally on board with this!)
> > What else would I like to see changed?
> > - exec.js (and any other platform-specific modules) should move to live
> in
> > platform repos
> >   - This will make code changes that affect both much easier
> > - Platforms should depend on cordova-js via package.json and snapshot
> > generation should happen in bin/create as well as plugin add/rm
> >   - This will remove the (somewhat) annoying step of snapshotting
> >   - This will allow cordova-js to be released as it's own artifact
> >     - Good because we can do things like add Promise polyfill and not
> need
> > to release all platforms to pick it up
> >     - A bit annoying since it's one more thing to release, but likely
> won't
> > get released often.
> >
> >
> > Please don't look at my email as trying to derail the work Anis did. I
> > believe most of it is necessary to accomplish these goals whether we use
> > Browserify, our own, or some other concattenator. I just question whether
> > 25MB is too much complexity for what we need / want.
> >
> >
> >
> >
> > On Thu, Dec 11, 2014 at 2:10 PM, Joe Bowser <bo...@gmail.com> wrote:
> >
> > > This should be a major, but yeah, I'm fine with making this the
> default.
> > >
> > > On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
> > >
> > > > so I think this has baked long enough! lets make it the default and
> > suss
> > > > the bugs.
> > > >
> > > > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <ao...@wizcorp.jp>
> > > wrote:
> > > >
> > > > > Ace, look forward to browser/web as platform. Combined Web and
> Native
> > > API
> > > > > plugin for Cordova! Yay!
> > > > > Thanks for the clarification Michal.
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com>
> > > wrote:
> > > > >
> > > > > > Right, browserify is just a way to package cordova.js that should
> > > make
> > > > it
> > > > > > easier to add the browser as a platform so might not be directly
> > > > related
> > > > > > but is somewhat related :-}
> > > > > >
> > > > > >
> > > > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <
> mmocny@chromium.org>
> > > > > wrote:
> > > > > >
> > > > > > > I think Ally may be confusing what this does?: This browserify
> > work
> > > > is
> > > > > > not
> > > > > > > a way to get cordova to run in a desktop browser, its just a
> > means
> > > > for
> > > > > > > packaging cordova.js.  I think there should be no visible
> change
> > to
> > > > end
> > > > > > > users.
> > > > > > >
> > > > > > > There is a separate effort to target the browser as a platform,
> > and
> > > > it
> > > > > > may
> > > > > > > be true that the browserify work helps with that, but its not
> > > > directly
> > > > > > > related.
> > > > > > >
> > > > > > >
> > > > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <
> anis.kadri@gmail.com
> > >
> > > > > wrote:
> > > > > > >
> > > > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
> > > aogilvie@wizcorp.jp
> > > > >
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Anis that is really sweet.
> > > > > > > > > If this hits CLI, plugin.xml will have sections for plugins
> > to
> > > do
> > > > > web
> > > > > > > > > actions?
> > > > > > > > >
> > > > > > > >
> > > > > > > > Not sure I understand what you mean by web actions.
> > > > > > > >
> > > > > > > >
> > > > > > > > > TBH.. i've always wanted a cordova platform add web... but
> > i'd
> > > be
> > > > > > happy
> > > > > > > > > enough with a prepare for browser only mode.
> > > > > > > > >
> > > > > > > >
> > > > > > > > `cordova platform add web` is part of the plan.
> > > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where
> > > there
> > > > > are
> > > > > > > JS,
> > > > > > > > > iOS & Android SDKs and a Cordova Plugin wants to support
> the
> > > same
> > > > > API
> > > > > > > on
> > > > > > > > > all platforms.
> > > > > > > > >
> > > > > > > >
> > > > > > > > Didn't think of that but it is applicable indeed.
> > > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
> > > > anis.kadri@gmail.com>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Ok cool. I can look at adding a --browserify option for
> run
> > > and
> > > > > > > > prepare.
> > > > > > > > > I
> > > > > > > > > > logged an issue for it [1]
> > > > > > > > > >
> > > > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> > > > > > agrieve@chromium.org
> > > > > > > >
> > > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > Thanks Anis!
> > > > > > > > > > >
> > > > > > > > > > > Tougher for CLI since it's actually the prepare step
> that
> > > > > creates
> > > > > > > > > > > cordova_plugins.js, but longer term (medium term?) I
> > don't
> > > > see
> > > > > > why
> > > > > > > we
> > > > > > > > > > > shouldn't just turn it on always anyways.
> > > > > > > > > > >
> > > > > > > > > > > So... Maybe cordova prepare --browserify?
> > > > > > > > > > > Build prepares first, so will also need: cordova run
> > > android
> > > > > > > > > --browserify
> > > > > > > > > > >
> > > > > > > > > > > I haven't looked at it yet. Google IO is next week and
> > it's
> > > > > been
> > > > > > > > > > consuming
> > > > > > > > > > > most of our time the last few weeks. Will definitely
> play
> > > > with
> > > > > it
> > > > > > > > next
> > > > > > > > > > next
> > > > > > > > > > > week though!
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> > > > > > anis.kadri@gmail.com>
> > > > > > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > >> Sorry. I forgot you asked the question. There was no
> > issue
> > > > but
> > > > > > > there
> > > > > > > > > is
> > > > > > > > > > >> one now.
> > > > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > > > > > > >>
> > > > > > > > > > >> This "feature" is plugman only for now. How important
> is
> > > it
> > > > to
> > > > > > > wire
> > > > > > > > it
> > > > > > > > > > >> to CLI ? Have  you guys had time to test it out yet ?
> > How
> > > > > would
> > > > > > it
> > > > > > > > > > >> work with CLI ? Add another flag such as "cordova
> plugin
> > > add
> > > > > > > > > > >> --browserify" ?
> > > > > > > > > > >>
> > > > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > > > > > > agrieve@chromium.org>
> > > > > > > > > > >> wrote:
> > > > > > > > > > >> > bump
> > > > > > > > > > >> >
> > > > > > > > > > >> >
> > > > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > > > > > > > agrieve@chromium.org
> > > > > > > > > > >
> > > > > > > > > > >> > wrote:
> > > > > > > > > > >> >>
> > > > > > > > > > >> >> Cool, yes! Thanks for the update!
> > > > > > > > > > >> >>
> > > > > > > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > > > > > > >> >>
> > > > > > > > > > >> >>
> > > > > > > > > > >> >>
> > > > > > > > > > >> >>
> > > > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > > > > > > > mmocny@chromium.org>
> > > > > > > > > > >> >> wrote:
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>> Awesome Anis.
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>> Will gladly take a look at this later today.  Just
> > > > wanted
> > > > > to
> > > > > > > > send
> > > > > > > > > a
> > > > > > > > > > >> quick
> > > > > > > > > > >> >>> thanks for landing this this way, and for the
> useful
> > > > > report.
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>> -Michal
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > > > > > > anis.kadri@gmail.com
> > > > > > > > > >
> > > > > > > > > > >> wrote:
> > > > > > > > > > >> >>>
> > > > > > > > > > >> >>> > Yo,
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > Just wanted to let everyone know that I added
> > > > browserify
> > > > > > > > support
> > > > > > > > > > to
> > > > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not
> hooked
> > > to
> > > > > this
> > > > > > > > yet.
> > > > > > > > > > Here
> > > > > > > > > > >> >>> > is how it works:
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
> > > > > --platform
> > > > > > > > > > [PLATFORM]
> > > > > > > > > > >> >>> > --project [PROJECT_PATH]
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > will generate a browserify version of
> cordova.js.
> > > > > Plugins
> > > > > > > and
> > > > > > > > > > >> >>> > everything is bundled in. This version passes
> > > > > mobile-spec
> > > > > > on
> > > > > > > > iOS
> > > > > > > > > > and
> > > > > > > > > > >> >>> > Android. I am not yet setup to test other
> > platforms.
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
> > > > [PLATFORM]
> > > > > > > > > --project
> > > > > > > > > > >> >>> > [PROJECT_PATH]
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > Will continue to generate cordova.js the way it
> > used
> > > > to.
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > Because some of you really care about benchmarks
> > > here
> > > > is
> > > > > > > some
> > > > > > > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > No browserify:
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > real 0m9.546s
> > > > > > > > > > >> >>> > user 0m4.673s
> > > > > > > > > > >> >>> > sys 0m0.692s
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > Browserify:
> > > > > > > > > > >> >>> > real 0m9.861s
> > > > > > > > > > >> >>> > user 0m4.759s
> > > > > > > > > > >> >>> > sys 0m0.648s
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > All cordova-lib tests are passing so I am
> assuming
> > > > this
> > > > > > has
> > > > > > > > > > minimal
> > > > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>> > Anis
> > > > > > > > > > >> >>> >
> > > > > > > > > > >> >>
> > > > > > > > > > >> >>
> > > > > > > > > > >> >
> > > > > > > > > > >>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
> > > http://www.wizcorp.jp/>
> > > > > > > > > ------------------------------
> > > > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
> > > Website
> > > > > > > > > <http://www.wizcorp.jp/> | Twitter <
> > > https://twitter.com/Wizcorp>
> > > > |
> > > > > > > > > Facebook
> > > > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > > > ------------------------------
> > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > > > > Facebook
> > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > <http://www.linkedin.com/company/wizcorp>
> > > > >
> > > >
> > >
> >
>

Re: Browserify JS is in

Posted by Michal Mocny <mm...@chromium.org>.
25MB is for the one-time cordova-cli install, and not overhead for the
app.  Its not perfect but not a blocker imho.

There are more troubling things about the change than the size overhead:
- I don't think browserify has "baked" at all.  It was landed behind a
flag, but is it actually used anywhere?
- Why browserify and not webpack (aside: its 13Mb..)?  Was it compared at
all..
- Last time it was discussed, there were still several breaking changes for
plugins.  Were they resolved?

Anyway, how can we get data on the change to see if it is positive?:
- Existing plugins continue to work (We run mobile spec, and get downstream
distributions run tests on their plugins).
- Startup time is not negatively affected.
- Build/prepare time is not negatively affected.

Is that fair?

-Michal

On Thu, Dec 11, 2014 at 2:38 PM, Andrew Grieve <ag...@chromium.org> wrote:

> I'd really like to get it fully spelled out *why* browserify is the right
> tool for this. Some thoughts below:
>
> On Wed, Dec 10, 2014 at 8:35 PM, Brian LeRoux <b...@brian.io> wrote:
>
> > we should move browserify to main and drop that insane concat code
> >
> > its not heavyweight at all. it creates a hash in iife with deps mapped
> > in…as to why dep mgmt is better than concatenating…I don't think we need
> to
> > waste our time talking about that!
>
>
>
> What makes the concat code insane?
>  - It's easy to understand and make changes to
>  - It seems to work fine and is quite stable
>  - It has no dependencies (it's 52kb within cordova-js/tasks/lib)
>
> Browserify seems a bit scary to me:
> - It's 25MB and has a tonne of dependencies
> - Do we really need all of that functionality?
>
> I think it would actually help a lot to talk about dependency management.
> - Right now cordova-js creates a module for every file in src/
> - Plugins list each module explicitly in their plugin.xml
> With browserify, are you envisioning that this model change at all?
>
>
> Why change anything?
> - cordova-lib should concat plugin modules with cordova.js on prepare (this
> is the motivation stated in the JIRA. totally on board with this!)
> What else would I like to see changed?
> - exec.js (and any other platform-specific modules) should move to live in
> platform repos
>   - This will make code changes that affect both much easier
> - Platforms should depend on cordova-js via package.json and snapshot
> generation should happen in bin/create as well as plugin add/rm
>   - This will remove the (somewhat) annoying step of snapshotting
>   - This will allow cordova-js to be released as it's own artifact
>     - Good because we can do things like add Promise polyfill and not need
> to release all platforms to pick it up
>     - A bit annoying since it's one more thing to release, but likely won't
> get released often.
>
>
> Please don't look at my email as trying to derail the work Anis did. I
> believe most of it is necessary to accomplish these goals whether we use
> Browserify, our own, or some other concattenator. I just question whether
> 25MB is too much complexity for what we need / want.
>
>
>
>
> On Thu, Dec 11, 2014 at 2:10 PM, Joe Bowser <bo...@gmail.com> wrote:
>
> > This should be a major, but yeah, I'm fine with making this the default.
> >
> > On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
> >
> > > so I think this has baked long enough! lets make it the default and
> suss
> > > the bugs.
> > >
> > > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <ao...@wizcorp.jp>
> > wrote:
> > >
> > > > Ace, look forward to browser/web as platform. Combined Web and Native
> > API
> > > > plugin for Cordova! Yay!
> > > > Thanks for the clarification Michal.
> > > >
> > > >
> > > >
> > > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com>
> > wrote:
> > > >
> > > > > Right, browserify is just a way to package cordova.js that should
> > make
> > > it
> > > > > easier to add the browser as a platform so might not be directly
> > > related
> > > > > but is somewhat related :-}
> > > > >
> > > > >
> > > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <mm...@chromium.org>
> > > > wrote:
> > > > >
> > > > > > I think Ally may be confusing what this does?: This browserify
> work
> > > is
> > > > > not
> > > > > > a way to get cordova to run in a desktop browser, its just a
> means
> > > for
> > > > > > packaging cordova.js.  I think there should be no visible change
> to
> > > end
> > > > > > users.
> > > > > >
> > > > > > There is a separate effort to target the browser as a platform,
> and
> > > it
> > > > > may
> > > > > > be true that the browserify work helps with that, but its not
> > > directly
> > > > > > related.
> > > > > >
> > > > > >
> > > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <anis.kadri@gmail.com
> >
> > > > wrote:
> > > > > >
> > > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
> > aogilvie@wizcorp.jp
> > > >
> > > > > > wrote:
> > > > > > >
> > > > > > > > Anis that is really sweet.
> > > > > > > > If this hits CLI, plugin.xml will have sections for plugins
> to
> > do
> > > > web
> > > > > > > > actions?
> > > > > > > >
> > > > > > >
> > > > > > > Not sure I understand what you mean by web actions.
> > > > > > >
> > > > > > >
> > > > > > > > TBH.. i've always wanted a cordova platform add web... but
> i'd
> > be
> > > > > happy
> > > > > > > > enough with a prepare for browser only mode.
> > > > > > > >
> > > > > > >
> > > > > > > `cordova platform add web` is part of the plan.
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where
> > there
> > > > are
> > > > > > JS,
> > > > > > > > iOS & Android SDKs and a Cordova Plugin wants to support the
> > same
> > > > API
> > > > > > on
> > > > > > > > all platforms.
> > > > > > > >
> > > > > > >
> > > > > > > Didn't think of that but it is applicable indeed.
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
> > > anis.kadri@gmail.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Ok cool. I can look at adding a --browserify option for run
> > and
> > > > > > > prepare.
> > > > > > > > I
> > > > > > > > > logged an issue for it [1]
> > > > > > > > >
> > > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> > > > > agrieve@chromium.org
> > > > > > >
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > Thanks Anis!
> > > > > > > > > >
> > > > > > > > > > Tougher for CLI since it's actually the prepare step that
> > > > creates
> > > > > > > > > > cordova_plugins.js, but longer term (medium term?) I
> don't
> > > see
> > > > > why
> > > > > > we
> > > > > > > > > > shouldn't just turn it on always anyways.
> > > > > > > > > >
> > > > > > > > > > So... Maybe cordova prepare --browserify?
> > > > > > > > > > Build prepares first, so will also need: cordova run
> > android
> > > > > > > > --browserify
> > > > > > > > > >
> > > > > > > > > > I haven't looked at it yet. Google IO is next week and
> it's
> > > > been
> > > > > > > > > consuming
> > > > > > > > > > most of our time the last few weeks. Will definitely play
> > > with
> > > > it
> > > > > > > next
> > > > > > > > > next
> > > > > > > > > > week though!
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> > > > > anis.kadri@gmail.com>
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > >> Sorry. I forgot you asked the question. There was no
> issue
> > > but
> > > > > > there
> > > > > > > > is
> > > > > > > > > >> one now.
> > > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > > > > > >>
> > > > > > > > > >> This "feature" is plugman only for now. How important is
> > it
> > > to
> > > > > > wire
> > > > > > > it
> > > > > > > > > >> to CLI ? Have  you guys had time to test it out yet ?
> How
> > > > would
> > > > > it
> > > > > > > > > >> work with CLI ? Add another flag such as "cordova plugin
> > add
> > > > > > > > > >> --browserify" ?
> > > > > > > > > >>
> > > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > > > > > agrieve@chromium.org>
> > > > > > > > > >> wrote:
> > > > > > > > > >> > bump
> > > > > > > > > >> >
> > > > > > > > > >> >
> > > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > > > > > > agrieve@chromium.org
> > > > > > > > > >
> > > > > > > > > >> > wrote:
> > > > > > > > > >> >>
> > > > > > > > > >> >> Cool, yes! Thanks for the update!
> > > > > > > > > >> >>
> > > > > > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > > > > > > mmocny@chromium.org>
> > > > > > > > > >> >> wrote:
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> Awesome Anis.
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> Will gladly take a look at this later today.  Just
> > > wanted
> > > > to
> > > > > > > send
> > > > > > > > a
> > > > > > > > > >> quick
> > > > > > > > > >> >>> thanks for landing this this way, and for the useful
> > > > report.
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> -Michal
> > > > > > > > > >> >>>
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > > > > > anis.kadri@gmail.com
> > > > > > > > >
> > > > > > > > > >> wrote:
> > > > > > > > > >> >>>
> > > > > > > > > >> >>> > Yo,
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Just wanted to let everyone know that I added
> > > browserify
> > > > > > > support
> > > > > > > > > to
> > > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not hooked
> > to
> > > > this
> > > > > > > yet.
> > > > > > > > > Here
> > > > > > > > > >> >>> > is how it works:
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
> > > > --platform
> > > > > > > > > [PLATFORM]
> > > > > > > > > >> >>> > --project [PROJECT_PATH]
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > will generate a browserify version of cordova.js.
> > > > Plugins
> > > > > > and
> > > > > > > > > >> >>> > everything is bundled in. This version passes
> > > > mobile-spec
> > > > > on
> > > > > > > iOS
> > > > > > > > > and
> > > > > > > > > >> >>> > Android. I am not yet setup to test other
> platforms.
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
> > > [PLATFORM]
> > > > > > > > --project
> > > > > > > > > >> >>> > [PROJECT_PATH]
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Will continue to generate cordova.js the way it
> used
> > > to.
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Because some of you really care about benchmarks
> > here
> > > is
> > > > > > some
> > > > > > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > No browserify:
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > real 0m9.546s
> > > > > > > > > >> >>> > user 0m4.673s
> > > > > > > > > >> >>> > sys 0m0.692s
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Browserify:
> > > > > > > > > >> >>> > real 0m9.861s
> > > > > > > > > >> >>> > user 0m4.759s
> > > > > > > > > >> >>> > sys 0m0.648s
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > All cordova-lib tests are passing so I am assuming
> > > this
> > > > > has
> > > > > > > > > minimal
> > > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>> > Anis
> > > > > > > > > >> >>> >
> > > > > > > > > >> >>
> > > > > > > > > >> >>
> > > > > > > > > >> >
> > > > > > > > > >>
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
> > http://www.wizcorp.jp/>
> > > > > > > > ------------------------------
> > > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
> > Website
> > > > > > > > <http://www.wizcorp.jp/> | Twitter <
> > https://twitter.com/Wizcorp>
> > > |
> > > > > > > > Facebook
> > > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > > ------------------------------
> > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > > > Facebook
> > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > <http://www.linkedin.com/company/wizcorp>
> > > >
> > >
> >
>

Re: Browserify JS is in

Posted by Andrew Grieve <ag...@chromium.org>.
Maybe most other companies are not in the same boat, but at Google we can't
add any software to our build process without it all being checked into
source control (and reviewed). Currently NPM is our biggest dependency, but
thankfully we use that only for fetching (and so don't need it if we
already have things locally). We launched an app (Primer) a few months ago,
and as a part of that I had to re-write some of cordova-lib in Python (was
actually not that bad). So, I'm really trying to figure out what the goals
of browserify are in case I need to re-implement it (Gorkem will also have
to re-implement it in Java for Thyme)

I *think* we're at:

1. To concatenate cordova-js with plugin JS
2. To trim away modules from cordova-js that are not used by plugins & the
active platform

Sound good? Complete list?




On Mon, Dec 15, 2014 at 9:25 AM, Michal Mocny <mm...@chromium.org> wrote:

> Thanks Steven.
>
> On Mon, Dec 15, 2014 at 12:15 AM, Steven Gill <st...@gmail.com>
> wrote:
> >
> > For the lazy: cordova_plugins.js discussion
> > https://issues.apache.org/jira/plugins/servlet/mobile#issue/CB-8153
> > On Dec 14, 2014 6:58 PM, "Michal Mocny" <mm...@chromium.org> wrote:
> >
> > > Lets discuss the cordova_plugins.js thing elsewhere, this thread has
> > forked
> > > a lot already.
> > >
> > > On Sun, Dec 14, 2014 at 6:22 PM, Carlos Santana <cs...@gmail.com>
> > > wrote:
> > > >
> > > > This is the part that I like the most:
> > > > "and start
> > > > writing plugins as proper node modules. Maybe even push them to npm
> and
> > > > manage dependencies that way."
> > > >
> > > > Agree with having less XHR, and concatenate cordova + plugins.
> > > > Not in love with cordova_plugins.js to know what plugins are included
> > in
> > > > the app, would prefer to see a package.json with all software that
> was
> > > use
> > > > to build the app, and maybe one day could a be a real valid
> > pacakge.json
> > > > that can be use to pull down dependencies.
> > > >
> > > > The same way we depend on npm, elementree, and dozen more npm modules
> > > that
> > > > our platforms and cli depend on, we don't distribute browserfy will
> be
> > > just
> > > > another one.
> > > > One thing I will consider with browserfy if there is a any code
> coming
> > > from
> > > > browserfy like the bootstrap code that contains the require function,
> > > then
> > > > maybe only this code get's legally review as it going to be part of
> the
> > > App
> > > > that developer builds with cordova.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Fri, Dec 12, 2014 at 5:34 PM, Brian LeRoux <b...@brian.io> wrote:
> > > > >
> > > > > yeah we are *not* proposing to distribute browserify or its deps
> > > > >
> > > > > On Fri, Dec 12, 2014 at 1:38 PM, Joe Bowser <bo...@gmail.com>
> > wrote:
> > > > >
> > > > > > What are we actually distributing?
> > > > > >
> > > > > > On Fri Dec 12 2014 at 12:36:03 PM Andrew Grieve <
> > > agrieve@chromium.org>
> > > > > > wrote:
> > > > > >
> > > > > > > On Fri, Dec 12, 2014 at 1:51 PM, Joe Bowser <bowserj@gmail.com
> >
> > > > wrote:
> > > > > > >
> > > > > > > > On Fri Dec 12 2014 at 10:25:51 AM Andrew Grieve <
> > > > > agrieve@chromium.org>
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > >
> > > > > > > > > I'm not actually worried about my disk filling up.
> > Dependencies
> > > > > must
> > > > > > be
> > > > > > > > > vetted for appropriate licenses, so now there's more
> overhead
> > > > here.
> > > > > > If
> > > > > > > we
> > > > > > > > > need to make a change to the module system now we need to
> > poor
> > > > > > through
> > > > > > > > docs
> > > > > > > > > and make PRs instead of just editing our very small
> > code-base.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > This mix of MIT and 3-Clause BSD looks compatible to me.
> It's
> > > > weaker
> > > > > > > than
> > > > > > > > Apache, but not incompatible.  Do we really need to send this
> > to
> > > > > legal?
> > > > > > > >
> > https://github.com/substack/node-browserify/blob/master/LICENSE
> > > > > > > >
> > > > > > > > There are people who can argue your other points better, but
> > > saying
> > > > > > that
> > > > > > > > the license is the overhead when you can find it in the repo?
> > > I'm
> > > > > not
> > > > > > > sure
> > > > > > > > how we would have gotten this far if we had to check with
> legal
> > > for
> > > > > > every
> > > > > > > > single dependency.
> > > > > > > >
> > > > > > >
> > > > > > > I meant that it depends on a bunch of other modules. Run
> > > > > license-checker
> > > > > > on
> > > > > > > browserify and you get: http://pastebin.com/XDMCTRRb
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Carlos Santana
> > > > <cs...@gmail.com>
> > > >
> > >
> >
>

Re: Browserify JS is in

Posted by Michal Mocny <mm...@chromium.org>.
Thanks Steven.

On Mon, Dec 15, 2014 at 12:15 AM, Steven Gill <st...@gmail.com>
wrote:
>
> For the lazy: cordova_plugins.js discussion
> https://issues.apache.org/jira/plugins/servlet/mobile#issue/CB-8153
> On Dec 14, 2014 6:58 PM, "Michal Mocny" <mm...@chromium.org> wrote:
>
> > Lets discuss the cordova_plugins.js thing elsewhere, this thread has
> forked
> > a lot already.
> >
> > On Sun, Dec 14, 2014 at 6:22 PM, Carlos Santana <cs...@gmail.com>
> > wrote:
> > >
> > > This is the part that I like the most:
> > > "and start
> > > writing plugins as proper node modules. Maybe even push them to npm and
> > > manage dependencies that way."
> > >
> > > Agree with having less XHR, and concatenate cordova + plugins.
> > > Not in love with cordova_plugins.js to know what plugins are included
> in
> > > the app, would prefer to see a package.json with all software that was
> > use
> > > to build the app, and maybe one day could a be a real valid
> pacakge.json
> > > that can be use to pull down dependencies.
> > >
> > > The same way we depend on npm, elementree, and dozen more npm modules
> > that
> > > our platforms and cli depend on, we don't distribute browserfy will be
> > just
> > > another one.
> > > One thing I will consider with browserfy if there is a any code coming
> > from
> > > browserfy like the bootstrap code that contains the require function,
> > then
> > > maybe only this code get's legally review as it going to be part of the
> > App
> > > that developer builds with cordova.
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Fri, Dec 12, 2014 at 5:34 PM, Brian LeRoux <b...@brian.io> wrote:
> > > >
> > > > yeah we are *not* proposing to distribute browserify or its deps
> > > >
> > > > On Fri, Dec 12, 2014 at 1:38 PM, Joe Bowser <bo...@gmail.com>
> wrote:
> > > >
> > > > > What are we actually distributing?
> > > > >
> > > > > On Fri Dec 12 2014 at 12:36:03 PM Andrew Grieve <
> > agrieve@chromium.org>
> > > > > wrote:
> > > > >
> > > > > > On Fri, Dec 12, 2014 at 1:51 PM, Joe Bowser <bo...@gmail.com>
> > > wrote:
> > > > > >
> > > > > > > On Fri Dec 12 2014 at 10:25:51 AM Andrew Grieve <
> > > > agrieve@chromium.org>
> > > > > > > wrote:
> > > > > > >
> > > > > > > >
> > > > > > > > I'm not actually worried about my disk filling up.
> Dependencies
> > > > must
> > > > > be
> > > > > > > > vetted for appropriate licenses, so now there's more overhead
> > > here.
> > > > > If
> > > > > > we
> > > > > > > > need to make a change to the module system now we need to
> poor
> > > > > through
> > > > > > > docs
> > > > > > > > and make PRs instead of just editing our very small
> code-base.
> > > > > > > >
> > > > > > > >
> > > > > > > This mix of MIT and 3-Clause BSD looks compatible to me.  It's
> > > weaker
> > > > > > than
> > > > > > > Apache, but not incompatible.  Do we really need to send this
> to
> > > > legal?
> > > > > > >
> https://github.com/substack/node-browserify/blob/master/LICENSE
> > > > > > >
> > > > > > > There are people who can argue your other points better, but
> > saying
> > > > > that
> > > > > > > the license is the overhead when you can find it in the repo?
> > I'm
> > > > not
> > > > > > sure
> > > > > > > how we would have gotten this far if we had to check with legal
> > for
> > > > > every
> > > > > > > single dependency.
> > > > > > >
> > > > > >
> > > > > > I meant that it depends on a bunch of other modules. Run
> > > > license-checker
> > > > > on
> > > > > > browserify and you get: http://pastebin.com/XDMCTRRb
> > > > > >
> > > > >
> > > >
> > >
> > >
> > > --
> > > Carlos Santana
> > > <cs...@gmail.com>
> > >
> >
>

Re: Browserify JS is in

Posted by Steven Gill <st...@gmail.com>.
For the lazy: cordova_plugins.js discussion
https://issues.apache.org/jira/plugins/servlet/mobile#issue/CB-8153
On Dec 14, 2014 6:58 PM, "Michal Mocny" <mm...@chromium.org> wrote:

> Lets discuss the cordova_plugins.js thing elsewhere, this thread has forked
> a lot already.
>
> On Sun, Dec 14, 2014 at 6:22 PM, Carlos Santana <cs...@gmail.com>
> wrote:
> >
> > This is the part that I like the most:
> > "and start
> > writing plugins as proper node modules. Maybe even push them to npm and
> > manage dependencies that way."
> >
> > Agree with having less XHR, and concatenate cordova + plugins.
> > Not in love with cordova_plugins.js to know what plugins are included in
> > the app, would prefer to see a package.json with all software that was
> use
> > to build the app, and maybe one day could a be a real valid pacakge.json
> > that can be use to pull down dependencies.
> >
> > The same way we depend on npm, elementree, and dozen more npm modules
> that
> > our platforms and cli depend on, we don't distribute browserfy will be
> just
> > another one.
> > One thing I will consider with browserfy if there is a any code coming
> from
> > browserfy like the bootstrap code that contains the require function,
> then
> > maybe only this code get's legally review as it going to be part of the
> App
> > that developer builds with cordova.
> >
> >
> >
> >
> >
> >
> > On Fri, Dec 12, 2014 at 5:34 PM, Brian LeRoux <b...@brian.io> wrote:
> > >
> > > yeah we are *not* proposing to distribute browserify or its deps
> > >
> > > On Fri, Dec 12, 2014 at 1:38 PM, Joe Bowser <bo...@gmail.com> wrote:
> > >
> > > > What are we actually distributing?
> > > >
> > > > On Fri Dec 12 2014 at 12:36:03 PM Andrew Grieve <
> agrieve@chromium.org>
> > > > wrote:
> > > >
> > > > > On Fri, Dec 12, 2014 at 1:51 PM, Joe Bowser <bo...@gmail.com>
> > wrote:
> > > > >
> > > > > > On Fri Dec 12 2014 at 10:25:51 AM Andrew Grieve <
> > > agrieve@chromium.org>
> > > > > > wrote:
> > > > > >
> > > > > > >
> > > > > > > I'm not actually worried about my disk filling up. Dependencies
> > > must
> > > > be
> > > > > > > vetted for appropriate licenses, so now there's more overhead
> > here.
> > > > If
> > > > > we
> > > > > > > need to make a change to the module system now we need to poor
> > > > through
> > > > > > docs
> > > > > > > and make PRs instead of just editing our very small code-base.
> > > > > > >
> > > > > > >
> > > > > > This mix of MIT and 3-Clause BSD looks compatible to me.  It's
> > weaker
> > > > > than
> > > > > > Apache, but not incompatible.  Do we really need to send this to
> > > legal?
> > > > > > https://github.com/substack/node-browserify/blob/master/LICENSE
> > > > > >
> > > > > > There are people who can argue your other points better, but
> saying
> > > > that
> > > > > > the license is the overhead when you can find it in the repo?
> I'm
> > > not
> > > > > sure
> > > > > > how we would have gotten this far if we had to check with legal
> for
> > > > every
> > > > > > single dependency.
> > > > > >
> > > > >
> > > > > I meant that it depends on a bunch of other modules. Run
> > > license-checker
> > > > on
> > > > > browserify and you get: http://pastebin.com/XDMCTRRb
> > > > >
> > > >
> > >
> >
> >
> > --
> > Carlos Santana
> > <cs...@gmail.com>
> >
>

Re: Browserify JS is in

Posted by Michal Mocny <mm...@chromium.org>.
Lets discuss the cordova_plugins.js thing elsewhere, this thread has forked
a lot already.

On Sun, Dec 14, 2014 at 6:22 PM, Carlos Santana <cs...@gmail.com>
wrote:
>
> This is the part that I like the most:
> "and start
> writing plugins as proper node modules. Maybe even push them to npm and
> manage dependencies that way."
>
> Agree with having less XHR, and concatenate cordova + plugins.
> Not in love with cordova_plugins.js to know what plugins are included in
> the app, would prefer to see a package.json with all software that was use
> to build the app, and maybe one day could a be a real valid pacakge.json
> that can be use to pull down dependencies.
>
> The same way we depend on npm, elementree, and dozen more npm modules that
> our platforms and cli depend on, we don't distribute browserfy will be just
> another one.
> One thing I will consider with browserfy if there is a any code coming from
> browserfy like the bootstrap code that contains the require function, then
> maybe only this code get's legally review as it going to be part of the App
> that developer builds with cordova.
>
>
>
>
>
>
> On Fri, Dec 12, 2014 at 5:34 PM, Brian LeRoux <b...@brian.io> wrote:
> >
> > yeah we are *not* proposing to distribute browserify or its deps
> >
> > On Fri, Dec 12, 2014 at 1:38 PM, Joe Bowser <bo...@gmail.com> wrote:
> >
> > > What are we actually distributing?
> > >
> > > On Fri Dec 12 2014 at 12:36:03 PM Andrew Grieve <ag...@chromium.org>
> > > wrote:
> > >
> > > > On Fri, Dec 12, 2014 at 1:51 PM, Joe Bowser <bo...@gmail.com>
> wrote:
> > > >
> > > > > On Fri Dec 12 2014 at 10:25:51 AM Andrew Grieve <
> > agrieve@chromium.org>
> > > > > wrote:
> > > > >
> > > > > >
> > > > > > I'm not actually worried about my disk filling up. Dependencies
> > must
> > > be
> > > > > > vetted for appropriate licenses, so now there's more overhead
> here.
> > > If
> > > > we
> > > > > > need to make a change to the module system now we need to poor
> > > through
> > > > > docs
> > > > > > and make PRs instead of just editing our very small code-base.
> > > > > >
> > > > > >
> > > > > This mix of MIT and 3-Clause BSD looks compatible to me.  It's
> weaker
> > > > than
> > > > > Apache, but not incompatible.  Do we really need to send this to
> > legal?
> > > > > https://github.com/substack/node-browserify/blob/master/LICENSE
> > > > >
> > > > > There are people who can argue your other points better, but saying
> > > that
> > > > > the license is the overhead when you can find it in the repo?  I'm
> > not
> > > > sure
> > > > > how we would have gotten this far if we had to check with legal for
> > > every
> > > > > single dependency.
> > > > >
> > > >
> > > > I meant that it depends on a bunch of other modules. Run
> > license-checker
> > > on
> > > > browserify and you get: http://pastebin.com/XDMCTRRb
> > > >
> > >
> >
>
>
> --
> Carlos Santana
> <cs...@gmail.com>
>

Re: Browserify JS is in

Posted by Carlos Santana <cs...@gmail.com>.
This is the part that I like the most:
"and start
writing plugins as proper node modules. Maybe even push them to npm and
manage dependencies that way."

Agree with having less XHR, and concatenate cordova + plugins.
Not in love with cordova_plugins.js to know what plugins are included in
the app, would prefer to see a package.json with all software that was use
to build the app, and maybe one day could a be a real valid pacakge.json
that can be use to pull down dependencies.

The same way we depend on npm, elementree, and dozen more npm modules that
our platforms and cli depend on, we don't distribute browserfy will be just
another one.
One thing I will consider with browserfy if there is a any code coming from
browserfy like the bootstrap code that contains the require function, then
maybe only this code get's legally review as it going to be part of the App
that developer builds with cordova.






On Fri, Dec 12, 2014 at 5:34 PM, Brian LeRoux <b...@brian.io> wrote:
>
> yeah we are *not* proposing to distribute browserify or its deps
>
> On Fri, Dec 12, 2014 at 1:38 PM, Joe Bowser <bo...@gmail.com> wrote:
>
> > What are we actually distributing?
> >
> > On Fri Dec 12 2014 at 12:36:03 PM Andrew Grieve <ag...@chromium.org>
> > wrote:
> >
> > > On Fri, Dec 12, 2014 at 1:51 PM, Joe Bowser <bo...@gmail.com> wrote:
> > >
> > > > On Fri Dec 12 2014 at 10:25:51 AM Andrew Grieve <
> agrieve@chromium.org>
> > > > wrote:
> > > >
> > > > >
> > > > > I'm not actually worried about my disk filling up. Dependencies
> must
> > be
> > > > > vetted for appropriate licenses, so now there's more overhead here.
> > If
> > > we
> > > > > need to make a change to the module system now we need to poor
> > through
> > > > docs
> > > > > and make PRs instead of just editing our very small code-base.
> > > > >
> > > > >
> > > > This mix of MIT and 3-Clause BSD looks compatible to me.  It's weaker
> > > than
> > > > Apache, but not incompatible.  Do we really need to send this to
> legal?
> > > > https://github.com/substack/node-browserify/blob/master/LICENSE
> > > >
> > > > There are people who can argue your other points better, but saying
> > that
> > > > the license is the overhead when you can find it in the repo?  I'm
> not
> > > sure
> > > > how we would have gotten this far if we had to check with legal for
> > every
> > > > single dependency.
> > > >
> > >
> > > I meant that it depends on a bunch of other modules. Run
> license-checker
> > on
> > > browserify and you get: http://pastebin.com/XDMCTRRb
> > >
> >
>


-- 
Carlos Santana
<cs...@gmail.com>

Re: Browserify JS is in

Posted by Brian LeRoux <b...@brian.io>.
yeah we are *not* proposing to distribute browserify or its deps

On Fri, Dec 12, 2014 at 1:38 PM, Joe Bowser <bo...@gmail.com> wrote:

> What are we actually distributing?
>
> On Fri Dec 12 2014 at 12:36:03 PM Andrew Grieve <ag...@chromium.org>
> wrote:
>
> > On Fri, Dec 12, 2014 at 1:51 PM, Joe Bowser <bo...@gmail.com> wrote:
> >
> > > On Fri Dec 12 2014 at 10:25:51 AM Andrew Grieve <ag...@chromium.org>
> > > wrote:
> > >
> > > >
> > > > I'm not actually worried about my disk filling up. Dependencies must
> be
> > > > vetted for appropriate licenses, so now there's more overhead here.
> If
> > we
> > > > need to make a change to the module system now we need to poor
> through
> > > docs
> > > > and make PRs instead of just editing our very small code-base.
> > > >
> > > >
> > > This mix of MIT and 3-Clause BSD looks compatible to me.  It's weaker
> > than
> > > Apache, but not incompatible.  Do we really need to send this to legal?
> > > https://github.com/substack/node-browserify/blob/master/LICENSE
> > >
> > > There are people who can argue your other points better, but saying
> that
> > > the license is the overhead when you can find it in the repo?  I'm not
> > sure
> > > how we would have gotten this far if we had to check with legal for
> every
> > > single dependency.
> > >
> >
> > I meant that it depends on a bunch of other modules. Run license-checker
> on
> > browserify and you get: http://pastebin.com/XDMCTRRb
> >
>

Re: Browserify JS is in

Posted by Joe Bowser <bo...@gmail.com>.
What are we actually distributing?

On Fri Dec 12 2014 at 12:36:03 PM Andrew Grieve <ag...@chromium.org>
wrote:

> On Fri, Dec 12, 2014 at 1:51 PM, Joe Bowser <bo...@gmail.com> wrote:
>
> > On Fri Dec 12 2014 at 10:25:51 AM Andrew Grieve <ag...@chromium.org>
> > wrote:
> >
> > >
> > > I'm not actually worried about my disk filling up. Dependencies must be
> > > vetted for appropriate licenses, so now there's more overhead here. If
> we
> > > need to make a change to the module system now we need to poor through
> > docs
> > > and make PRs instead of just editing our very small code-base.
> > >
> > >
> > This mix of MIT and 3-Clause BSD looks compatible to me.  It's weaker
> than
> > Apache, but not incompatible.  Do we really need to send this to legal?
> > https://github.com/substack/node-browserify/blob/master/LICENSE
> >
> > There are people who can argue your other points better, but saying that
> > the license is the overhead when you can find it in the repo?  I'm not
> sure
> > how we would have gotten this far if we had to check with legal for every
> > single dependency.
> >
>
> I meant that it depends on a bunch of other modules. Run license-checker on
> browserify and you get: http://pastebin.com/XDMCTRRb
>

Re: Browserify JS is in

Posted by Andrew Grieve <ag...@chromium.org>.
On Fri, Dec 12, 2014 at 1:51 PM, Joe Bowser <bo...@gmail.com> wrote:

> On Fri Dec 12 2014 at 10:25:51 AM Andrew Grieve <ag...@chromium.org>
> wrote:
>
> >
> > I'm not actually worried about my disk filling up. Dependencies must be
> > vetted for appropriate licenses, so now there's more overhead here. If we
> > need to make a change to the module system now we need to poor through
> docs
> > and make PRs instead of just editing our very small code-base.
> >
> >
> This mix of MIT and 3-Clause BSD looks compatible to me.  It's weaker than
> Apache, but not incompatible.  Do we really need to send this to legal?
> https://github.com/substack/node-browserify/blob/master/LICENSE
>
> There are people who can argue your other points better, but saying that
> the license is the overhead when you can find it in the repo?  I'm not sure
> how we would have gotten this far if we had to check with legal for every
> single dependency.
>

I meant that it depends on a bunch of other modules. Run license-checker on
browserify and you get: http://pastebin.com/XDMCTRRb

Re: Browserify JS is in

Posted by Joe Bowser <bo...@gmail.com>.
On Fri Dec 12 2014 at 10:25:51 AM Andrew Grieve <ag...@chromium.org>
wrote:

>
> I'm not actually worried about my disk filling up. Dependencies must be
> vetted for appropriate licenses, so now there's more overhead here. If we
> need to make a change to the module system now we need to poor through docs
> and make PRs instead of just editing our very small code-base.
>
>
This mix of MIT and 3-Clause BSD looks compatible to me.  It's weaker than
Apache, but not incompatible.  Do we really need to send this to legal?
https://github.com/substack/node-browserify/blob/master/LICENSE

There are people who can argue your other points better, but saying that
the license is the overhead when you can find it in the repo?  I'm not sure
how we would have gotten this far if we had to check with legal for every
single dependency.

Re: Browserify JS is in

Posted by Andrew Grieve <ag...@chromium.org>.
On Thu, Dec 11, 2014 at 2:38 PM, Andrew Grieve <ag...@chromium.org> wrote:

> I'd really like to get it fully spelled out *why* browserify is the right
> tool for this. Some thoughts below:
>
> On Wed, Dec 10, 2014 at 8:35 PM, Brian LeRoux <b...@brian.io> wrote:
>
>> we should move browserify to main and drop that insane concat code
>>
>> its not heavyweight at all. it creates a hash in iife with deps mapped
>> in…as to why dep mgmt is better than concatenating…I don't think we need
>> to
>> waste our time talking about that!
>
>
>
> What makes the concat code insane?
>  - It's easy to understand and make changes to
>  - It seems to work fine and is quite stable
>  - It has no dependencies (it's 52kb within cordova-js/tasks/lib)
>
> Browserify seems a bit scary to me:
> - It's 25MB and has a tonne of dependencies
> - Do we really need all of that functionality?
>

I'm not actually worried about my disk filling up. Dependencies must be
vetted for appropriate licenses, so now there's more overhead here. If we
need to make a change to the module system now we need to poor through docs
and make PRs instead of just editing our very small code-base.


>
> I think it would actually help a lot to talk about dependency management.
> - Right now cordova-js creates a module for every file in src/
> - Plugins list each module explicitly in their plugin.xml
> With browserify, are you envisioning that this model change at all?
>
>
> Why change anything?
> - cordova-lib should concat plugin modules with cordova.js on prepare
> (this is the motivation stated in the JIRA. totally on board with this!)
> What else would I like to see changed?
> - exec.js (and any other platform-specific modules) should move to live in
> platform repos
>   - This will make code changes that affect both much easier
> - Platforms should depend on cordova-js via package.json and snapshot
> generation should happen in bin/create as well as plugin add/rm
>   - This will remove the (somewhat) annoying step of snapshotting
>   - This will allow cordova-js to be released as it's own artifact
>     - Good because we can do things like add Promise polyfill and not need
> to release all platforms to pick it up
>     - A bit annoying since it's one more thing to release, but likely
> won't get released often.
>

I realize that browserify does all of the above. My point with this though,
was to point out that all of these requirements are also trivially met by
concatenating our existing modules together ourselves.

Now - How does it make cordova.js smaller? If it's removing "unused"
modules, that's a breaking change since before application code could
require() it, and now it can't. This is probably fine, since I don't think
that's a use-case that exists. Maybe this another point for our
"motivations" list? It's the only one that browserify gives that shelljs.cat
doesn't.

Agree with Michal that cordova_plugins.js still needs to exist, but that it
should just be concatenated in.



>
>
> Please don't look at my email as trying to derail the work Anis did. I
> believe most of it is necessary to accomplish these goals whether we use
> Browserify, our own, or some other concattenator. I just question whether
> 25MB is too much complexity for what we need / want.
>
>
>
>
> On Thu, Dec 11, 2014 at 2:10 PM, Joe Bowser <bo...@gmail.com> wrote:
>
>> This should be a major, but yeah, I'm fine with making this the default.
>>
>> On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
>>
>> > so I think this has baked long enough! lets make it the default and suss
>> > the bugs.
>> >
>> > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <ao...@wizcorp.jp>
>> wrote:
>> >
>> > > Ace, look forward to browser/web as platform. Combined Web and Native
>> API
>> > > plugin for Cordova! Yay!
>> > > Thanks for the clarification Michal.
>> > >
>> > >
>> > >
>> > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com>
>> wrote:
>> > >
>> > > > Right, browserify is just a way to package cordova.js that should
>> make
>> > it
>> > > > easier to add the browser as a platform so might not be directly
>> > related
>> > > > but is somewhat related :-}
>> > > >
>> > > >
>> > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <mm...@chromium.org>
>> > > wrote:
>> > > >
>> > > > > I think Ally may be confusing what this does?: This browserify
>> work
>> > is
>> > > > not
>> > > > > a way to get cordova to run in a desktop browser, its just a means
>> > for
>> > > > > packaging cordova.js.  I think there should be no visible change
>> to
>> > end
>> > > > > users.
>> > > > >
>> > > > > There is a separate effort to target the browser as a platform,
>> and
>> > it
>> > > > may
>> > > > > be true that the browserify work helps with that, but its not
>> > directly
>> > > > > related.
>> > > > >
>> > > > >
>> > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <an...@gmail.com>
>> > > wrote:
>> > > > >
>> > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
>> aogilvie@wizcorp.jp
>> > >
>> > > > > wrote:
>> > > > > >
>> > > > > > > Anis that is really sweet.
>> > > > > > > If this hits CLI, plugin.xml will have sections for plugins
>> to do
>> > > web
>> > > > > > > actions?
>> > > > > > >
>> > > > > >
>> > > > > > Not sure I understand what you mean by web actions.
>> > > > > >
>> > > > > >
>> > > > > > > TBH.. i've always wanted a cordova platform add web... but
>> i'd be
>> > > > happy
>> > > > > > > enough with a prepare for browser only mode.
>> > > > > > >
>> > > > > >
>> > > > > > `cordova platform add web` is part of the plan.
>> > > > > >
>> > > > > >
>> > > > > > >
>> > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where
>> there
>> > > are
>> > > > > JS,
>> > > > > > > iOS & Android SDKs and a Cordova Plugin wants to support the
>> same
>> > > API
>> > > > > on
>> > > > > > > all platforms.
>> > > > > > >
>> > > > > >
>> > > > > > Didn't think of that but it is applicable indeed.
>> > > > > >
>> > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
>> > anis.kadri@gmail.com>
>> > > > > > wrote:
>> > > > > > >
>> > > > > > > > Ok cool. I can look at adding a --browserify option for run
>> and
>> > > > > > prepare.
>> > > > > > > I
>> > > > > > > > logged an issue for it [1]
>> > > > > > > >
>> > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
>> > > > agrieve@chromium.org
>> > > > > >
>> > > > > > > > wrote:
>> > > > > > > >
>> > > > > > > > > Thanks Anis!
>> > > > > > > > >
>> > > > > > > > > Tougher for CLI since it's actually the prepare step that
>> > > creates
>> > > > > > > > > cordova_plugins.js, but longer term (medium term?) I don't
>> > see
>> > > > why
>> > > > > we
>> > > > > > > > > shouldn't just turn it on always anyways.
>> > > > > > > > >
>> > > > > > > > > So... Maybe cordova prepare --browserify?
>> > > > > > > > > Build prepares first, so will also need: cordova run
>> android
>> > > > > > > --browserify
>> > > > > > > > >
>> > > > > > > > > I haven't looked at it yet. Google IO is next week and
>> it's
>> > > been
>> > > > > > > > consuming
>> > > > > > > > > most of our time the last few weeks. Will definitely play
>> > with
>> > > it
>> > > > > > next
>> > > > > > > > next
>> > > > > > > > > week though!
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
>> > > > anis.kadri@gmail.com>
>> > > > > > > > wrote:
>> > > > > > > > >
>> > > > > > > > >> Sorry. I forgot you asked the question. There was no
>> issue
>> > but
>> > > > > there
>> > > > > > > is
>> > > > > > > > >> one now.
>> > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
>> > > > > > > > >>
>> > > > > > > > >> This "feature" is plugman only for now. How important is
>> it
>> > to
>> > > > > wire
>> > > > > > it
>> > > > > > > > >> to CLI ? Have  you guys had time to test it out yet ? How
>> > > would
>> > > > it
>> > > > > > > > >> work with CLI ? Add another flag such as "cordova plugin
>> add
>> > > > > > > > >> --browserify" ?
>> > > > > > > > >>
>> > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
>> > > > > > agrieve@chromium.org>
>> > > > > > > > >> wrote:
>> > > > > > > > >> > bump
>> > > > > > > > >> >
>> > > > > > > > >> >
>> > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
>> > > > > > > agrieve@chromium.org
>> > > > > > > > >
>> > > > > > > > >> > wrote:
>> > > > > > > > >> >>
>> > > > > > > > >> >> Cool, yes! Thanks for the update!
>> > > > > > > > >> >>
>> > > > > > > > >> >> Is there a JIRA for this? Was asked in
>> > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
>> > > > > > > > >> >>
>> > > > > > > > >> >>
>> > > > > > > > >> >>
>> > > > > > > > >> >>
>> > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
>> > > > > > > mmocny@chromium.org>
>> > > > > > > > >> >> wrote:
>> > > > > > > > >> >>>
>> > > > > > > > >> >>> Awesome Anis.
>> > > > > > > > >> >>>
>> > > > > > > > >> >>> Will gladly take a look at this later today.  Just
>> > wanted
>> > > to
>> > > > > > send
>> > > > > > > a
>> > > > > > > > >> quick
>> > > > > > > > >> >>> thanks for landing this this way, and for the useful
>> > > report.
>> > > > > > > > >> >>>
>> > > > > > > > >> >>> -Michal
>> > > > > > > > >> >>>
>> > > > > > > > >> >>>
>> > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
>> > > > > > anis.kadri@gmail.com
>> > > > > > > >
>> > > > > > > > >> wrote:
>> > > > > > > > >> >>>
>> > > > > > > > >> >>> > Yo,
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>> > Just wanted to let everyone know that I added
>> > browserify
>> > > > > > support
>> > > > > > > > to
>> > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not hooked
>> to
>> > > this
>> > > > > > yet.
>> > > > > > > > Here
>> > > > > > > > >> >>> > is how it works:
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
>> > > --platform
>> > > > > > > > [PLATFORM]
>> > > > > > > > >> >>> > --project [PROJECT_PATH]
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>> > will generate a browserify version of cordova.js.
>> > > Plugins
>> > > > > and
>> > > > > > > > >> >>> > everything is bundled in. This version passes
>> > > mobile-spec
>> > > > on
>> > > > > > iOS
>> > > > > > > > and
>> > > > > > > > >> >>> > Android. I am not yet setup to test other
>> platforms.
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
>> > [PLATFORM]
>> > > > > > > --project
>> > > > > > > > >> >>> > [PROJECT_PATH]
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>> > Will continue to generate cordova.js the way it
>> used
>> > to.
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>> > Because some of you really care about benchmarks
>> here
>> > is
>> > > > > some
>> > > > > > > > >> >>> > comparison for dependencies-plugin install:
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>> > No browserify:
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>> > real 0m9.546s
>> > > > > > > > >> >>> > user 0m4.673s
>> > > > > > > > >> >>> > sys 0m0.692s
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>> > Browserify:
>> > > > > > > > >> >>> > real 0m9.861s
>> > > > > > > > >> >>> > user 0m4.759s
>> > > > > > > > >> >>> > sys 0m0.648s
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>> > All cordova-lib tests are passing so I am assuming
>> > this
>> > > > has
>> > > > > > > > minimal
>> > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>> > Anis
>> > > > > > > > >> >>> >
>> > > > > > > > >> >>
>> > > > > > > > >> >>
>> > > > > > > > >> >
>> > > > > > > > >>
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > --
>> > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
>> > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
>> http://www.wizcorp.jp/>
>> > > > > > > ------------------------------
>> > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
>> Website
>> > > > > > > <http://www.wizcorp.jp/> | Twitter <
>> https://twitter.com/Wizcorp>
>> > |
>> > > > > > > Facebook
>> > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
>> > > > > > > <http://www.linkedin.com/company/wizcorp>
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > <http://www.wizcorp.jp/>Ally Ogilvie
>> > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
>> > > ------------------------------
>> > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
>> > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
>> > > Facebook
>> > > <http://www.facebook.com/Wizcorp> | LinkedIn
>> > > <http://www.linkedin.com/company/wizcorp>
>> > >
>> >
>>
>
>

Re: Browserify JS is in

Posted by Andrew Grieve <ag...@chromium.org>.
I'd really like to get it fully spelled out *why* browserify is the right
tool for this. Some thoughts below:

On Wed, Dec 10, 2014 at 8:35 PM, Brian LeRoux <b...@brian.io> wrote:

> we should move browserify to main and drop that insane concat code
>
> its not heavyweight at all. it creates a hash in iife with deps mapped
> in…as to why dep mgmt is better than concatenating…I don't think we need to
> waste our time talking about that!



What makes the concat code insane?
 - It's easy to understand and make changes to
 - It seems to work fine and is quite stable
 - It has no dependencies (it's 52kb within cordova-js/tasks/lib)

Browserify seems a bit scary to me:
- It's 25MB and has a tonne of dependencies
- Do we really need all of that functionality?

I think it would actually help a lot to talk about dependency management.
- Right now cordova-js creates a module for every file in src/
- Plugins list each module explicitly in their plugin.xml
With browserify, are you envisioning that this model change at all?


Why change anything?
- cordova-lib should concat plugin modules with cordova.js on prepare (this
is the motivation stated in the JIRA. totally on board with this!)
What else would I like to see changed?
- exec.js (and any other platform-specific modules) should move to live in
platform repos
  - This will make code changes that affect both much easier
- Platforms should depend on cordova-js via package.json and snapshot
generation should happen in bin/create as well as plugin add/rm
  - This will remove the (somewhat) annoying step of snapshotting
  - This will allow cordova-js to be released as it's own artifact
    - Good because we can do things like add Promise polyfill and not need
to release all platforms to pick it up
    - A bit annoying since it's one more thing to release, but likely won't
get released often.


Please don't look at my email as trying to derail the work Anis did. I
believe most of it is necessary to accomplish these goals whether we use
Browserify, our own, or some other concattenator. I just question whether
25MB is too much complexity for what we need / want.




On Thu, Dec 11, 2014 at 2:10 PM, Joe Bowser <bo...@gmail.com> wrote:

> This should be a major, but yeah, I'm fine with making this the default.
>
> On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
>
> > so I think this has baked long enough! lets make it the default and suss
> > the bugs.
> >
> > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <ao...@wizcorp.jp>
> wrote:
> >
> > > Ace, look forward to browser/web as platform. Combined Web and Native
> API
> > > plugin for Cordova! Yay!
> > > Thanks for the clarification Michal.
> > >
> > >
> > >
> > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com>
> wrote:
> > >
> > > > Right, browserify is just a way to package cordova.js that should
> make
> > it
> > > > easier to add the browser as a platform so might not be directly
> > related
> > > > but is somewhat related :-}
> > > >
> > > >
> > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <mm...@chromium.org>
> > > wrote:
> > > >
> > > > > I think Ally may be confusing what this does?: This browserify work
> > is
> > > > not
> > > > > a way to get cordova to run in a desktop browser, its just a means
> > for
> > > > > packaging cordova.js.  I think there should be no visible change to
> > end
> > > > > users.
> > > > >
> > > > > There is a separate effort to target the browser as a platform, and
> > it
> > > > may
> > > > > be true that the browserify work helps with that, but its not
> > directly
> > > > > related.
> > > > >
> > > > >
> > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <an...@gmail.com>
> > > wrote:
> > > > >
> > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
> aogilvie@wizcorp.jp
> > >
> > > > > wrote:
> > > > > >
> > > > > > > Anis that is really sweet.
> > > > > > > If this hits CLI, plugin.xml will have sections for plugins to
> do
> > > web
> > > > > > > actions?
> > > > > > >
> > > > > >
> > > > > > Not sure I understand what you mean by web actions.
> > > > > >
> > > > > >
> > > > > > > TBH.. i've always wanted a cordova platform add web... but i'd
> be
> > > > happy
> > > > > > > enough with a prepare for browser only mode.
> > > > > > >
> > > > > >
> > > > > > `cordova platform add web` is part of the plan.
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where
> there
> > > are
> > > > > JS,
> > > > > > > iOS & Android SDKs and a Cordova Plugin wants to support the
> same
> > > API
> > > > > on
> > > > > > > all platforms.
> > > > > > >
> > > > > >
> > > > > > Didn't think of that but it is applicable indeed.
> > > > > >
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
> > anis.kadri@gmail.com>
> > > > > > wrote:
> > > > > > >
> > > > > > > > Ok cool. I can look at adding a --browserify option for run
> and
> > > > > > prepare.
> > > > > > > I
> > > > > > > > logged an issue for it [1]
> > > > > > > >
> > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > > > > >
> > > > > > > >
> > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> > > > agrieve@chromium.org
> > > > > >
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Thanks Anis!
> > > > > > > > >
> > > > > > > > > Tougher for CLI since it's actually the prepare step that
> > > creates
> > > > > > > > > cordova_plugins.js, but longer term (medium term?) I don't
> > see
> > > > why
> > > > > we
> > > > > > > > > shouldn't just turn it on always anyways.
> > > > > > > > >
> > > > > > > > > So... Maybe cordova prepare --browserify?
> > > > > > > > > Build prepares first, so will also need: cordova run
> android
> > > > > > > --browserify
> > > > > > > > >
> > > > > > > > > I haven't looked at it yet. Google IO is next week and it's
> > > been
> > > > > > > > consuming
> > > > > > > > > most of our time the last few weeks. Will definitely play
> > with
> > > it
> > > > > > next
> > > > > > > > next
> > > > > > > > > week though!
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> > > > anis.kadri@gmail.com>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > >> Sorry. I forgot you asked the question. There was no issue
> > but
> > > > > there
> > > > > > > is
> > > > > > > > >> one now.
> > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > > > > >>
> > > > > > > > >> This "feature" is plugman only for now. How important is
> it
> > to
> > > > > wire
> > > > > > it
> > > > > > > > >> to CLI ? Have  you guys had time to test it out yet ? How
> > > would
> > > > it
> > > > > > > > >> work with CLI ? Add another flag such as "cordova plugin
> add
> > > > > > > > >> --browserify" ?
> > > > > > > > >>
> > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > > > > agrieve@chromium.org>
> > > > > > > > >> wrote:
> > > > > > > > >> > bump
> > > > > > > > >> >
> > > > > > > > >> >
> > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > > > > > agrieve@chromium.org
> > > > > > > > >
> > > > > > > > >> > wrote:
> > > > > > > > >> >>
> > > > > > > > >> >> Cool, yes! Thanks for the update!
> > > > > > > > >> >>
> > > > > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > > > > >> >>
> > > > > > > > >> >>
> > > > > > > > >> >>
> > > > > > > > >> >>
> > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > > > > > mmocny@chromium.org>
> > > > > > > > >> >> wrote:
> > > > > > > > >> >>>
> > > > > > > > >> >>> Awesome Anis.
> > > > > > > > >> >>>
> > > > > > > > >> >>> Will gladly take a look at this later today.  Just
> > wanted
> > > to
> > > > > > send
> > > > > > > a
> > > > > > > > >> quick
> > > > > > > > >> >>> thanks for landing this this way, and for the useful
> > > report.
> > > > > > > > >> >>>
> > > > > > > > >> >>> -Michal
> > > > > > > > >> >>>
> > > > > > > > >> >>>
> > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > > > > anis.kadri@gmail.com
> > > > > > > >
> > > > > > > > >> wrote:
> > > > > > > > >> >>>
> > > > > > > > >> >>> > Yo,
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > Just wanted to let everyone know that I added
> > browserify
> > > > > > support
> > > > > > > > to
> > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not hooked
> to
> > > this
> > > > > > yet.
> > > > > > > > Here
> > > > > > > > >> >>> > is how it works:
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
> > > --platform
> > > > > > > > [PLATFORM]
> > > > > > > > >> >>> > --project [PROJECT_PATH]
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > will generate a browserify version of cordova.js.
> > > Plugins
> > > > > and
> > > > > > > > >> >>> > everything is bundled in. This version passes
> > > mobile-spec
> > > > on
> > > > > > iOS
> > > > > > > > and
> > > > > > > > >> >>> > Android. I am not yet setup to test other platforms.
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
> > [PLATFORM]
> > > > > > > --project
> > > > > > > > >> >>> > [PROJECT_PATH]
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > Will continue to generate cordova.js the way it used
> > to.
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > Because some of you really care about benchmarks
> here
> > is
> > > > > some
> > > > > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > No browserify:
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > real 0m9.546s
> > > > > > > > >> >>> > user 0m4.673s
> > > > > > > > >> >>> > sys 0m0.692s
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > Browserify:
> > > > > > > > >> >>> > real 0m9.861s
> > > > > > > > >> >>> > user 0m4.759s
> > > > > > > > >> >>> > sys 0m0.648s
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > All cordova-lib tests are passing so I am assuming
> > this
> > > > has
> > > > > > > > minimal
> > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > Anis
> > > > > > > > >> >>> >
> > > > > > > > >> >>
> > > > > > > > >> >>
> > > > > > > > >> >
> > > > > > > > >>
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
> http://www.wizcorp.jp/>
> > > > > > > ------------------------------
> > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
> Website
> > > > > > > <http://www.wizcorp.jp/> | Twitter <
> https://twitter.com/Wizcorp>
> > |
> > > > > > > Facebook
> > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > ------------------------------
> > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > > Facebook
> > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > <http://www.linkedin.com/company/wizcorp>
> > >
> >
>

Re: Browserify JS is in

Posted by Darryl Pogue <dv...@gmail.com>.
On 17 December 2014 at 15:26, Steven Gill <st...@gmail.com> wrote:
> Sounds like a bug. Can you file an issue for it?
>

https://issues.apache.org/jira/browse/CB-8183

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: Browserify JS is in

Posted by Steven Gill <st...@gmail.com>.
Sounds like a bug. Can you file an issue for it?

On Wed, Dec 17, 2014 at 12:53 PM, Darryl Pogue <dv...@gmail.com> wrote:
>
> On 11 December 2014 at 11:37, Steven Gill <st...@gmail.com> wrote:
> > I also would like to see this shipped! If you have questions about it,
> LMK
> >
>
> I was trying this out today, and overall I love the idea. I found one
> issue though when building for multiple platforms:
>
> cordova platform add ios android
> cordova build --browserify
>
> The Android build was fine, but the iOS build was throwing up prompt
> boxes. My guess is that browserify generated a cordova.js for Android
> and then used the same file for iOS, so the Android bridge/exec code
> was getting run on iOS and failing.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Re: Browserify JS is in

Posted by Darryl Pogue <dv...@gmail.com>.
On 11 December 2014 at 11:37, Steven Gill <st...@gmail.com> wrote:
> I also would like to see this shipped! If you have questions about it, LMK
>

I was trying this out today, and overall I love the idea. I found one
issue though when building for multiple platforms:

cordova platform add ios android
cordova build --browserify

The Android build was fine, but the iOS build was throwing up prompt
boxes. My guess is that browserify generated a cordova.js for Android
and then used the same file for iOS, so the Android bridge/exec code
was getting run on iOS and failing.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: Browserify JS is in

Posted by Steven Gill <st...@gmail.com>.
I also would like to see this shipped! If you have questions about it, LMK

On Thu, Dec 11, 2014 at 11:10 AM, Joe Bowser <bo...@gmail.com> wrote:

> This should be a major, but yeah, I'm fine with making this the default.
>
> On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:
>
> > so I think this has baked long enough! lets make it the default and suss
> > the bugs.
> >
> > On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <ao...@wizcorp.jp>
> wrote:
> >
> > > Ace, look forward to browser/web as platform. Combined Web and Native
> API
> > > plugin for Cordova! Yay!
> > > Thanks for the clarification Michal.
> > >
> > >
> > >
> > > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com>
> wrote:
> > >
> > > > Right, browserify is just a way to package cordova.js that should
> make
> > it
> > > > easier to add the browser as a platform so might not be directly
> > related
> > > > but is somewhat related :-}
> > > >
> > > >
> > > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <mm...@chromium.org>
> > > wrote:
> > > >
> > > > > I think Ally may be confusing what this does?: This browserify work
> > is
> > > > not
> > > > > a way to get cordova to run in a desktop browser, its just a means
> > for
> > > > > packaging cordova.js.  I think there should be no visible change to
> > end
> > > > > users.
> > > > >
> > > > > There is a separate effort to target the browser as a platform, and
> > it
> > > > may
> > > > > be true that the browserify work helps with that, but its not
> > directly
> > > > > related.
> > > > >
> > > > >
> > > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <an...@gmail.com>
> > > wrote:
> > > > >
> > > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <
> aogilvie@wizcorp.jp
> > >
> > > > > wrote:
> > > > > >
> > > > > > > Anis that is really sweet.
> > > > > > > If this hits CLI, plugin.xml will have sections for plugins to
> do
> > > web
> > > > > > > actions?
> > > > > > >
> > > > > >
> > > > > > Not sure I understand what you mean by web actions.
> > > > > >
> > > > > >
> > > > > > > TBH.. i've always wanted a cordova platform add web... but i'd
> be
> > > > happy
> > > > > > > enough with a prepare for browser only mode.
> > > > > > >
> > > > > >
> > > > > > `cordova platform add web` is part of the plan.
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where
> there
> > > are
> > > > > JS,
> > > > > > > iOS & Android SDKs and a Cordova Plugin wants to support the
> same
> > > API
> > > > > on
> > > > > > > all platforms.
> > > > > > >
> > > > > >
> > > > > > Didn't think of that but it is applicable indeed.
> > > > > >
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
> > anis.kadri@gmail.com>
> > > > > > wrote:
> > > > > > >
> > > > > > > > Ok cool. I can look at adding a --browserify option for run
> and
> > > > > > prepare.
> > > > > > > I
> > > > > > > > logged an issue for it [1]
> > > > > > > >
> > > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > > > > >
> > > > > > > >
> > > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> > > > agrieve@chromium.org
> > > > > >
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Thanks Anis!
> > > > > > > > >
> > > > > > > > > Tougher for CLI since it's actually the prepare step that
> > > creates
> > > > > > > > > cordova_plugins.js, but longer term (medium term?) I don't
> > see
> > > > why
> > > > > we
> > > > > > > > > shouldn't just turn it on always anyways.
> > > > > > > > >
> > > > > > > > > So... Maybe cordova prepare --browserify?
> > > > > > > > > Build prepares first, so will also need: cordova run
> android
> > > > > > > --browserify
> > > > > > > > >
> > > > > > > > > I haven't looked at it yet. Google IO is next week and it's
> > > been
> > > > > > > > consuming
> > > > > > > > > most of our time the last few weeks. Will definitely play
> > with
> > > it
> > > > > > next
> > > > > > > > next
> > > > > > > > > week though!
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> > > > anis.kadri@gmail.com>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > >> Sorry. I forgot you asked the question. There was no issue
> > but
> > > > > there
> > > > > > > is
> > > > > > > > >> one now.
> > > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > > > > >>
> > > > > > > > >> This "feature" is plugman only for now. How important is
> it
> > to
> > > > > wire
> > > > > > it
> > > > > > > > >> to CLI ? Have  you guys had time to test it out yet ? How
> > > would
> > > > it
> > > > > > > > >> work with CLI ? Add another flag such as "cordova plugin
> add
> > > > > > > > >> --browserify" ?
> > > > > > > > >>
> > > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > > > > agrieve@chromium.org>
> > > > > > > > >> wrote:
> > > > > > > > >> > bump
> > > > > > > > >> >
> > > > > > > > >> >
> > > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > > > > > agrieve@chromium.org
> > > > > > > > >
> > > > > > > > >> > wrote:
> > > > > > > > >> >>
> > > > > > > > >> >> Cool, yes! Thanks for the update!
> > > > > > > > >> >>
> > > > > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > > > > >> >>
> > > > > > > > >> >>
> > > > > > > > >> >>
> > > > > > > > >> >>
> > > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > > > > > mmocny@chromium.org>
> > > > > > > > >> >> wrote:
> > > > > > > > >> >>>
> > > > > > > > >> >>> Awesome Anis.
> > > > > > > > >> >>>
> > > > > > > > >> >>> Will gladly take a look at this later today.  Just
> > wanted
> > > to
> > > > > > send
> > > > > > > a
> > > > > > > > >> quick
> > > > > > > > >> >>> thanks for landing this this way, and for the useful
> > > report.
> > > > > > > > >> >>>
> > > > > > > > >> >>> -Michal
> > > > > > > > >> >>>
> > > > > > > > >> >>>
> > > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > > > > anis.kadri@gmail.com
> > > > > > > >
> > > > > > > > >> wrote:
> > > > > > > > >> >>>
> > > > > > > > >> >>> > Yo,
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > Just wanted to let everyone know that I added
> > browserify
> > > > > > support
> > > > > > > > to
> > > > > > > > >> >>> > plugman (behind a flag for now). CLI is not hooked
> to
> > > this
> > > > > > yet.
> > > > > > > > Here
> > > > > > > > >> >>> > is how it works:
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
> > > --platform
> > > > > > > > [PLATFORM]
> > > > > > > > >> >>> > --project [PROJECT_PATH]
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > will generate a browserify version of cordova.js.
> > > Plugins
> > > > > and
> > > > > > > > >> >>> > everything is bundled in. This version passes
> > > mobile-spec
> > > > on
> > > > > > iOS
> > > > > > > > and
> > > > > > > > >> >>> > Android. I am not yet setup to test other platforms.
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
> > [PLATFORM]
> > > > > > > --project
> > > > > > > > >> >>> > [PROJECT_PATH]
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > Will continue to generate cordova.js the way it used
> > to.
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > Because some of you really care about benchmarks
> here
> > is
> > > > > some
> > > > > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > No browserify:
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > real 0m9.546s
> > > > > > > > >> >>> > user 0m4.673s
> > > > > > > > >> >>> > sys 0m0.692s
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > Browserify:
> > > > > > > > >> >>> > real 0m9.861s
> > > > > > > > >> >>> > user 0m4.759s
> > > > > > > > >> >>> > sys 0m0.648s
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > All cordova-lib tests are passing so I am assuming
> > this
> > > > has
> > > > > > > > minimal
> > > > > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > > > > >> >>> >
> > > > > > > > >> >>> > Anis
> > > > > > > > >> >>> >
> > > > > > > > >> >>
> > > > > > > > >> >>
> > > > > > > > >> >
> > > > > > > > >>
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > > Lead Developer - MobDev. | Wizcorp Inc. <
> http://www.wizcorp.jp/>
> > > > > > > ------------------------------
> > > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 |
> Website
> > > > > > > <http://www.wizcorp.jp/> | Twitter <
> https://twitter.com/Wizcorp>
> > |
> > > > > > > Facebook
> > > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > ------------------------------
> > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > > Facebook
> > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > <http://www.linkedin.com/company/wizcorp>
> > >
> >
>

Re: Browserify JS is in

Posted by Joe Bowser <bo...@gmail.com>.
This should be a major, but yeah, I'm fine with making this the default.

On Thu, Dec 11, 2014, 11:08 AM Brian LeRoux <b...@brian.io> wrote:

> so I think this has baked long enough! lets make it the default and suss
> the bugs.
>
> On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <ao...@wizcorp.jp> wrote:
>
> > Ace, look forward to browser/web as platform. Combined Web and Native API
> > plugin for Cordova! Yay!
> > Thanks for the clarification Michal.
> >
> >
> >
> > On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com> wrote:
> >
> > > Right, browserify is just a way to package cordova.js that should make
> it
> > > easier to add the browser as a platform so might not be directly
> related
> > > but is somewhat related :-}
> > >
> > >
> > > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <mm...@chromium.org>
> > wrote:
> > >
> > > > I think Ally may be confusing what this does?: This browserify work
> is
> > > not
> > > > a way to get cordova to run in a desktop browser, its just a means
> for
> > > > packaging cordova.js.  I think there should be no visible change to
> end
> > > > users.
> > > >
> > > > There is a separate effort to target the browser as a platform, and
> it
> > > may
> > > > be true that the browserify work helps with that, but its not
> directly
> > > > related.
> > > >
> > > >
> > > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <an...@gmail.com>
> > wrote:
> > > >
> > > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <aogilvie@wizcorp.jp
> >
> > > > wrote:
> > > > >
> > > > > > Anis that is really sweet.
> > > > > > If this hits CLI, plugin.xml will have sections for plugins to do
> > web
> > > > > > actions?
> > > > > >
> > > > >
> > > > > Not sure I understand what you mean by web actions.
> > > > >
> > > > >
> > > > > > TBH.. i've always wanted a cordova platform add web... but i'd be
> > > happy
> > > > > > enough with a prepare for browser only mode.
> > > > > >
> > > > >
> > > > > `cordova platform add web` is part of the plan.
> > > > >
> > > > >
> > > > > >
> > > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where there
> > are
> > > > JS,
> > > > > > iOS & Android SDKs and a Cordova Plugin wants to support the same
> > API
> > > > on
> > > > > > all platforms.
> > > > > >
> > > > >
> > > > > Didn't think of that but it is applicable indeed.
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <
> anis.kadri@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > > > Ok cool. I can look at adding a --browserify option for run and
> > > > > prepare.
> > > > > > I
> > > > > > > logged an issue for it [1]
> > > > > > >
> > > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > > > >
> > > > > > >
> > > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> > > agrieve@chromium.org
> > > > >
> > > > > > > wrote:
> > > > > > >
> > > > > > > > Thanks Anis!
> > > > > > > >
> > > > > > > > Tougher for CLI since it's actually the prepare step that
> > creates
> > > > > > > > cordova_plugins.js, but longer term (medium term?) I don't
> see
> > > why
> > > > we
> > > > > > > > shouldn't just turn it on always anyways.
> > > > > > > >
> > > > > > > > So... Maybe cordova prepare --browserify?
> > > > > > > > Build prepares first, so will also need: cordova run android
> > > > > > --browserify
> > > > > > > >
> > > > > > > > I haven't looked at it yet. Google IO is next week and it's
> > been
> > > > > > > consuming
> > > > > > > > most of our time the last few weeks. Will definitely play
> with
> > it
> > > > > next
> > > > > > > next
> > > > > > > > week though!
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> > > anis.kadri@gmail.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > >> Sorry. I forgot you asked the question. There was no issue
> but
> > > > there
> > > > > > is
> > > > > > > >> one now.
> > > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > > > >>
> > > > > > > >> This "feature" is plugman only for now. How important is it
> to
> > > > wire
> > > > > it
> > > > > > > >> to CLI ? Have  you guys had time to test it out yet ? How
> > would
> > > it
> > > > > > > >> work with CLI ? Add another flag such as "cordova plugin add
> > > > > > > >> --browserify" ?
> > > > > > > >>
> > > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > > > agrieve@chromium.org>
> > > > > > > >> wrote:
> > > > > > > >> > bump
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > > > > agrieve@chromium.org
> > > > > > > >
> > > > > > > >> > wrote:
> > > > > > > >> >>
> > > > > > > >> >> Cool, yes! Thanks for the update!
> > > > > > > >> >>
> > > > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > > > >> >>
> > > > > > > >> >>
> > > > > > > >> >>
> > > > > > > >> >>
> > > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > > > > mmocny@chromium.org>
> > > > > > > >> >> wrote:
> > > > > > > >> >>>
> > > > > > > >> >>> Awesome Anis.
> > > > > > > >> >>>
> > > > > > > >> >>> Will gladly take a look at this later today.  Just
> wanted
> > to
> > > > > send
> > > > > > a
> > > > > > > >> quick
> > > > > > > >> >>> thanks for landing this this way, and for the useful
> > report.
> > > > > > > >> >>>
> > > > > > > >> >>> -Michal
> > > > > > > >> >>>
> > > > > > > >> >>>
> > > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > > > anis.kadri@gmail.com
> > > > > > >
> > > > > > > >> wrote:
> > > > > > > >> >>>
> > > > > > > >> >>> > Yo,
> > > > > > > >> >>> >
> > > > > > > >> >>> > Just wanted to let everyone know that I added
> browserify
> > > > > support
> > > > > > > to
> > > > > > > >> >>> > plugman (behind a flag for now). CLI is not hooked to
> > this
> > > > > yet.
> > > > > > > Here
> > > > > > > >> >>> > is how it works:
> > > > > > > >> >>> >
> > > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
> > --platform
> > > > > > > [PLATFORM]
> > > > > > > >> >>> > --project [PROJECT_PATH]
> > > > > > > >> >>> >
> > > > > > > >> >>> > will generate a browserify version of cordova.js.
> > Plugins
> > > > and
> > > > > > > >> >>> > everything is bundled in. This version passes
> > mobile-spec
> > > on
> > > > > iOS
> > > > > > > and
> > > > > > > >> >>> > Android. I am not yet setup to test other platforms.
> > > > > > > >> >>> >
> > > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform
> [PLATFORM]
> > > > > > --project
> > > > > > > >> >>> > [PROJECT_PATH]
> > > > > > > >> >>> >
> > > > > > > >> >>> > Will continue to generate cordova.js the way it used
> to.
> > > > > > > >> >>> >
> > > > > > > >> >>> > Because some of you really care about benchmarks here
> is
> > > > some
> > > > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > > > >> >>> >
> > > > > > > >> >>> > No browserify:
> > > > > > > >> >>> >
> > > > > > > >> >>> > real 0m9.546s
> > > > > > > >> >>> > user 0m4.673s
> > > > > > > >> >>> > sys 0m0.692s
> > > > > > > >> >>> >
> > > > > > > >> >>> > Browserify:
> > > > > > > >> >>> > real 0m9.861s
> > > > > > > >> >>> > user 0m4.759s
> > > > > > > >> >>> > sys 0m0.648s
> > > > > > > >> >>> >
> > > > > > > >> >>> > All cordova-lib tests are passing so I am assuming
> this
> > > has
> > > > > > > minimal
> > > > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > > > >> >>> >
> > > > > > > >> >>> > Anis
> > > > > > > >> >>> >
> > > > > > > >> >>
> > > > > > > >> >>
> > > > > > > >> >
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > > > > ------------------------------
> > > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > > > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp>
> |
> > > > > > Facebook
> > > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > > <http://www.linkedin.com/company/wizcorp>
> > > > > >
> > > > >
> > > >
> > >
> >
> >
> >
> > --
> > <http://www.wizcorp.jp/>Ally Ogilvie
> > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > ------------------------------
> > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > Facebook
> > <http://www.facebook.com/Wizcorp> | LinkedIn
> > <http://www.linkedin.com/company/wizcorp>
> >
>

Re: Browserify JS is in

Posted by Brian LeRoux <b...@brian.io>.
so I think this has baked long enough! lets make it the default and suss
the bugs.

On Thu, Jul 10, 2014 at 3:36 AM, Ally Ogilvie <ao...@wizcorp.jp> wrote:

> Ace, look forward to browser/web as platform. Combined Web and Native API
> plugin for Cordova! Yay!
> Thanks for the clarification Michal.
>
>
>
> On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com> wrote:
>
> > Right, browserify is just a way to package cordova.js that should make it
> > easier to add the browser as a platform so might not be directly related
> > but is somewhat related :-}
> >
> >
> > On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <mm...@chromium.org>
> wrote:
> >
> > > I think Ally may be confusing what this does?: This browserify work is
> > not
> > > a way to get cordova to run in a desktop browser, its just a means for
> > > packaging cordova.js.  I think there should be no visible change to end
> > > users.
> > >
> > > There is a separate effort to target the browser as a platform, and it
> > may
> > > be true that the browserify work helps with that, but its not directly
> > > related.
> > >
> > >
> > > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <an...@gmail.com>
> wrote:
> > >
> > > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <ao...@wizcorp.jp>
> > > wrote:
> > > >
> > > > > Anis that is really sweet.
> > > > > If this hits CLI, plugin.xml will have sections for plugins to do
> web
> > > > > actions?
> > > > >
> > > >
> > > > Not sure I understand what you mean by web actions.
> > > >
> > > >
> > > > > TBH.. i've always wanted a cordova platform add web... but i'd be
> > happy
> > > > > enough with a prepare for browser only mode.
> > > > >
> > > >
> > > > `cordova platform add web` is part of the plan.
> > > >
> > > >
> > > > >
> > > > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where there
> are
> > > JS,
> > > > > iOS & Android SDKs and a Cordova Plugin wants to support the same
> API
> > > on
> > > > > all platforms.
> > > > >
> > > >
> > > > Didn't think of that but it is applicable indeed.
> > > >
> > > >
> > > > >
> > > > >
> > > > >
> > > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <an...@gmail.com>
> > > > wrote:
> > > > >
> > > > > > Ok cool. I can look at adding a --browserify option for run and
> > > > prepare.
> > > > > I
> > > > > > logged an issue for it [1]
> > > > > >
> > > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > > >
> > > > > >
> > > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> > agrieve@chromium.org
> > > >
> > > > > > wrote:
> > > > > >
> > > > > > > Thanks Anis!
> > > > > > >
> > > > > > > Tougher for CLI since it's actually the prepare step that
> creates
> > > > > > > cordova_plugins.js, but longer term (medium term?) I don't see
> > why
> > > we
> > > > > > > shouldn't just turn it on always anyways.
> > > > > > >
> > > > > > > So... Maybe cordova prepare --browserify?
> > > > > > > Build prepares first, so will also need: cordova run android
> > > > > --browserify
> > > > > > >
> > > > > > > I haven't looked at it yet. Google IO is next week and it's
> been
> > > > > > consuming
> > > > > > > most of our time the last few weeks. Will definitely play with
> it
> > > > next
> > > > > > next
> > > > > > > week though!
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> > anis.kadri@gmail.com>
> > > > > > wrote:
> > > > > > >
> > > > > > >> Sorry. I forgot you asked the question. There was no issue but
> > > there
> > > > > is
> > > > > > >> one now.
> > > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > > >>
> > > > > > >> This "feature" is plugman only for now. How important is it to
> > > wire
> > > > it
> > > > > > >> to CLI ? Have  you guys had time to test it out yet ? How
> would
> > it
> > > > > > >> work with CLI ? Add another flag such as "cordova plugin add
> > > > > > >> --browserify" ?
> > > > > > >>
> > > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > > agrieve@chromium.org>
> > > > > > >> wrote:
> > > > > > >> > bump
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > > > agrieve@chromium.org
> > > > > > >
> > > > > > >> > wrote:
> > > > > > >> >>
> > > > > > >> >> Cool, yes! Thanks for the update!
> > > > > > >> >>
> > > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > > > mmocny@chromium.org>
> > > > > > >> >> wrote:
> > > > > > >> >>>
> > > > > > >> >>> Awesome Anis.
> > > > > > >> >>>
> > > > > > >> >>> Will gladly take a look at this later today.  Just wanted
> to
> > > > send
> > > > > a
> > > > > > >> quick
> > > > > > >> >>> thanks for landing this this way, and for the useful
> report.
> > > > > > >> >>>
> > > > > > >> >>> -Michal
> > > > > > >> >>>
> > > > > > >> >>>
> > > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > > anis.kadri@gmail.com
> > > > > >
> > > > > > >> wrote:
> > > > > > >> >>>
> > > > > > >> >>> > Yo,
> > > > > > >> >>> >
> > > > > > >> >>> > Just wanted to let everyone know that I added browserify
> > > > support
> > > > > > to
> > > > > > >> >>> > plugman (behind a flag for now). CLI is not hooked to
> this
> > > > yet.
> > > > > > Here
> > > > > > >> >>> > is how it works:
> > > > > > >> >>> >
> > > > > > >> >>> > plugman install --browserify --plugin [PLUGIN]
> --platform
> > > > > > [PLATFORM]
> > > > > > >> >>> > --project [PROJECT_PATH]
> > > > > > >> >>> >
> > > > > > >> >>> > will generate a browserify version of cordova.js.
> Plugins
> > > and
> > > > > > >> >>> > everything is bundled in. This version passes
> mobile-spec
> > on
> > > > iOS
> > > > > > and
> > > > > > >> >>> > Android. I am not yet setup to test other platforms.
> > > > > > >> >>> >
> > > > > > >> >>> > plugman install --plugin [PLUGIN] --platform [PLATFORM]
> > > > > --project
> > > > > > >> >>> > [PROJECT_PATH]
> > > > > > >> >>> >
> > > > > > >> >>> > Will continue to generate cordova.js the way it used to.
> > > > > > >> >>> >
> > > > > > >> >>> > Because some of you really care about benchmarks here is
> > > some
> > > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > > >> >>> >
> > > > > > >> >>> > No browserify:
> > > > > > >> >>> >
> > > > > > >> >>> > real 0m9.546s
> > > > > > >> >>> > user 0m4.673s
> > > > > > >> >>> > sys 0m0.692s
> > > > > > >> >>> >
> > > > > > >> >>> > Browserify:
> > > > > > >> >>> > real 0m9.861s
> > > > > > >> >>> > user 0m4.759s
> > > > > > >> >>> > sys 0m0.648s
> > > > > > >> >>> >
> > > > > > >> >>> > All cordova-lib tests are passing so I am assuming this
> > has
> > > > > > minimal
> > > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > > >> >>> >
> > > > > > >> >>> > Anis
> > > > > > >> >>> >
> > > > > > >> >>
> > > > > > >> >>
> > > > > > >> >
> > > > > > >>
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > > > ------------------------------
> > > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > > > > Facebook
> > > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > > <http://www.linkedin.com/company/wizcorp>
> > > > >
> > > >
> > >
> >
>
>
>
> --
> <http://www.wizcorp.jp/>Ally Ogilvie
> Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> ------------------------------
> TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> Facebook
> <http://www.facebook.com/Wizcorp> | LinkedIn
> <http://www.linkedin.com/company/wizcorp>
>

Re: Browserify JS is in

Posted by Ally Ogilvie <ao...@wizcorp.jp>.
Ace, look forward to browser/web as platform. Combined Web and Native API
plugin for Cordova! Yay!
Thanks for the clarification Michal.



On Tue, Jul 8, 2014 at 6:07 AM, Anis KADRI <an...@gmail.com> wrote:

> Right, browserify is just a way to package cordova.js that should make it
> easier to add the browser as a platform so might not be directly related
> but is somewhat related :-}
>
>
> On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <mm...@chromium.org> wrote:
>
> > I think Ally may be confusing what this does?: This browserify work is
> not
> > a way to get cordova to run in a desktop browser, its just a means for
> > packaging cordova.js.  I think there should be no visible change to end
> > users.
> >
> > There is a separate effort to target the browser as a platform, and it
> may
> > be true that the browserify work helps with that, but its not directly
> > related.
> >
> >
> > On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <an...@gmail.com> wrote:
> >
> > > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <ao...@wizcorp.jp>
> > wrote:
> > >
> > > > Anis that is really sweet.
> > > > If this hits CLI, plugin.xml will have sections for plugins to do web
> > > > actions?
> > > >
> > >
> > > Not sure I understand what you mean by web actions.
> > >
> > >
> > > > TBH.. i've always wanted a cordova platform add web... but i'd be
> happy
> > > > enough with a prepare for browser only mode.
> > > >
> > >
> > > `cordova platform add web` is part of the plan.
> > >
> > >
> > > >
> > > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where there are
> > JS,
> > > > iOS & Android SDKs and a Cordova Plugin wants to support the same API
> > on
> > > > all platforms.
> > > >
> > >
> > > Didn't think of that but it is applicable indeed.
> > >
> > >
> > > >
> > > >
> > > >
> > > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <an...@gmail.com>
> > > wrote:
> > > >
> > > > > Ok cool. I can look at adding a --browserify option for run and
> > > prepare.
> > > > I
> > > > > logged an issue for it [1]
> > > > >
> > > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > > >
> > > > >
> > > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <
> agrieve@chromium.org
> > >
> > > > > wrote:
> > > > >
> > > > > > Thanks Anis!
> > > > > >
> > > > > > Tougher for CLI since it's actually the prepare step that creates
> > > > > > cordova_plugins.js, but longer term (medium term?) I don't see
> why
> > we
> > > > > > shouldn't just turn it on always anyways.
> > > > > >
> > > > > > So... Maybe cordova prepare --browserify?
> > > > > > Build prepares first, so will also need: cordova run android
> > > > --browserify
> > > > > >
> > > > > > I haven't looked at it yet. Google IO is next week and it's been
> > > > > consuming
> > > > > > most of our time the last few weeks. Will definitely play with it
> > > next
> > > > > next
> > > > > > week though!
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <
> anis.kadri@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > >> Sorry. I forgot you asked the question. There was no issue but
> > there
> > > > is
> > > > > >> one now.
> > > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > > >>
> > > > > >> This "feature" is plugman only for now. How important is it to
> > wire
> > > it
> > > > > >> to CLI ? Have  you guys had time to test it out yet ? How would
> it
> > > > > >> work with CLI ? Add another flag such as "cordova plugin add
> > > > > >> --browserify" ?
> > > > > >>
> > > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > > agrieve@chromium.org>
> > > > > >> wrote:
> > > > > >> > bump
> > > > > >> >
> > > > > >> >
> > > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > > agrieve@chromium.org
> > > > > >
> > > > > >> > wrote:
> > > > > >> >>
> > > > > >> >> Cool, yes! Thanks for the update!
> > > > > >> >>
> > > > > >> >> Is there a JIRA for this? Was asked in
> > > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > > >> >>
> > > > > >> >>
> > > > > >> >>
> > > > > >> >>
> > > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > > mmocny@chromium.org>
> > > > > >> >> wrote:
> > > > > >> >>>
> > > > > >> >>> Awesome Anis.
> > > > > >> >>>
> > > > > >> >>> Will gladly take a look at this later today.  Just wanted to
> > > send
> > > > a
> > > > > >> quick
> > > > > >> >>> thanks for landing this this way, and for the useful report.
> > > > > >> >>>
> > > > > >> >>> -Michal
> > > > > >> >>>
> > > > > >> >>>
> > > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > > anis.kadri@gmail.com
> > > > >
> > > > > >> wrote:
> > > > > >> >>>
> > > > > >> >>> > Yo,
> > > > > >> >>> >
> > > > > >> >>> > Just wanted to let everyone know that I added browserify
> > > support
> > > > > to
> > > > > >> >>> > plugman (behind a flag for now). CLI is not hooked to this
> > > yet.
> > > > > Here
> > > > > >> >>> > is how it works:
> > > > > >> >>> >
> > > > > >> >>> > plugman install --browserify --plugin [PLUGIN] --platform
> > > > > [PLATFORM]
> > > > > >> >>> > --project [PROJECT_PATH]
> > > > > >> >>> >
> > > > > >> >>> > will generate a browserify version of cordova.js. Plugins
> > and
> > > > > >> >>> > everything is bundled in. This version passes mobile-spec
> on
> > > iOS
> > > > > and
> > > > > >> >>> > Android. I am not yet setup to test other platforms.
> > > > > >> >>> >
> > > > > >> >>> > plugman install --plugin [PLUGIN] --platform [PLATFORM]
> > > > --project
> > > > > >> >>> > [PROJECT_PATH]
> > > > > >> >>> >
> > > > > >> >>> > Will continue to generate cordova.js the way it used to.
> > > > > >> >>> >
> > > > > >> >>> > Because some of you really care about benchmarks here is
> > some
> > > > > >> >>> > comparison for dependencies-plugin install:
> > > > > >> >>> >
> > > > > >> >>> > No browserify:
> > > > > >> >>> >
> > > > > >> >>> > real 0m9.546s
> > > > > >> >>> > user 0m4.673s
> > > > > >> >>> > sys 0m0.692s
> > > > > >> >>> >
> > > > > >> >>> > Browserify:
> > > > > >> >>> > real 0m9.861s
> > > > > >> >>> > user 0m4.759s
> > > > > >> >>> > sys 0m0.648s
> > > > > >> >>> >
> > > > > >> >>> > All cordova-lib tests are passing so I am assuming this
> has
> > > > > minimal
> > > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > > >> >>> >
> > > > > >> >>> > Anis
> > > > > >> >>> >
> > > > > >> >>
> > > > > >> >>
> > > > > >> >
> > > > > >>
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > > ------------------------------
> > > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > > > Facebook
> > > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > > <http://www.linkedin.com/company/wizcorp>
> > > >
> > >
> >
>



-- 
<http://www.wizcorp.jp/>Ally Ogilvie
Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
------------------------------
TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
<http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> | Facebook
<http://www.facebook.com/Wizcorp> | LinkedIn
<http://www.linkedin.com/company/wizcorp>

Re: Browserify JS is in

Posted by Anis KADRI <an...@gmail.com>.
Right, browserify is just a way to package cordova.js that should make it
easier to add the browser as a platform so might not be directly related
but is somewhat related :-}


On Mon, Jul 7, 2014 at 4:45 PM, Michal Mocny <mm...@chromium.org> wrote:

> I think Ally may be confusing what this does?: This browserify work is not
> a way to get cordova to run in a desktop browser, its just a means for
> packaging cordova.js.  I think there should be no visible change to end
> users.
>
> There is a separate effort to target the browser as a platform, and it may
> be true that the browserify work helps with that, but its not directly
> related.
>
>
> On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <an...@gmail.com> wrote:
>
> > On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <ao...@wizcorp.jp>
> wrote:
> >
> > > Anis that is really sweet.
> > > If this hits CLI, plugin.xml will have sections for plugins to do web
> > > actions?
> > >
> >
> > Not sure I understand what you mean by web actions.
> >
> >
> > > TBH.. i've always wanted a cordova platform add web... but i'd be happy
> > > enough with a prepare for browser only mode.
> > >
> >
> > `cordova platform add web` is part of the plan.
> >
> >
> > >
> > > Seeing a lot of use cases (e.g. Facebook plugin etc.) where there are
> JS,
> > > iOS & Android SDKs and a Cordova Plugin wants to support the same API
> on
> > > all platforms.
> > >
> >
> > Didn't think of that but it is applicable indeed.
> >
> >
> > >
> > >
> > >
> > > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <an...@gmail.com>
> > wrote:
> > >
> > > > Ok cool. I can look at adding a --browserify option for run and
> > prepare.
> > > I
> > > > logged an issue for it [1]
> > > >
> > > > [1] https://issues.apache.org/jira/browse/CB-7001
> > > >
> > > >
> > > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <agrieve@chromium.org
> >
> > > > wrote:
> > > >
> > > > > Thanks Anis!
> > > > >
> > > > > Tougher for CLI since it's actually the prepare step that creates
> > > > > cordova_plugins.js, but longer term (medium term?) I don't see why
> we
> > > > > shouldn't just turn it on always anyways.
> > > > >
> > > > > So... Maybe cordova prepare --browserify?
> > > > > Build prepares first, so will also need: cordova run android
> > > --browserify
> > > > >
> > > > > I haven't looked at it yet. Google IO is next week and it's been
> > > > consuming
> > > > > most of our time the last few weeks. Will definitely play with it
> > next
> > > > next
> > > > > week though!
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <an...@gmail.com>
> > > > wrote:
> > > > >
> > > > >> Sorry. I forgot you asked the question. There was no issue but
> there
> > > is
> > > > >> one now.
> > > > >> https://issues.apache.org/jira/browse/CB-6990
> > > > >>
> > > > >> This "feature" is plugman only for now. How important is it to
> wire
> > it
> > > > >> to CLI ? Have  you guys had time to test it out yet ? How would it
> > > > >> work with CLI ? Add another flag such as "cordova plugin add
> > > > >> --browserify" ?
> > > > >>
> > > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> > agrieve@chromium.org>
> > > > >> wrote:
> > > > >> > bump
> > > > >> >
> > > > >> >
> > > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > > agrieve@chromium.org
> > > > >
> > > > >> > wrote:
> > > > >> >>
> > > > >> >> Cool, yes! Thanks for the update!
> > > > >> >>
> > > > >> >> Is there a JIRA for this? Was asked in
> > > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > > mmocny@chromium.org>
> > > > >> >> wrote:
> > > > >> >>>
> > > > >> >>> Awesome Anis.
> > > > >> >>>
> > > > >> >>> Will gladly take a look at this later today.  Just wanted to
> > send
> > > a
> > > > >> quick
> > > > >> >>> thanks for landing this this way, and for the useful report.
> > > > >> >>>
> > > > >> >>> -Michal
> > > > >> >>>
> > > > >> >>>
> > > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> > anis.kadri@gmail.com
> > > >
> > > > >> wrote:
> > > > >> >>>
> > > > >> >>> > Yo,
> > > > >> >>> >
> > > > >> >>> > Just wanted to let everyone know that I added browserify
> > support
> > > > to
> > > > >> >>> > plugman (behind a flag for now). CLI is not hooked to this
> > yet.
> > > > Here
> > > > >> >>> > is how it works:
> > > > >> >>> >
> > > > >> >>> > plugman install --browserify --plugin [PLUGIN] --platform
> > > > [PLATFORM]
> > > > >> >>> > --project [PROJECT_PATH]
> > > > >> >>> >
> > > > >> >>> > will generate a browserify version of cordova.js. Plugins
> and
> > > > >> >>> > everything is bundled in. This version passes mobile-spec on
> > iOS
> > > > and
> > > > >> >>> > Android. I am not yet setup to test other platforms.
> > > > >> >>> >
> > > > >> >>> > plugman install --plugin [PLUGIN] --platform [PLATFORM]
> > > --project
> > > > >> >>> > [PROJECT_PATH]
> > > > >> >>> >
> > > > >> >>> > Will continue to generate cordova.js the way it used to.
> > > > >> >>> >
> > > > >> >>> > Because some of you really care about benchmarks here is
> some
> > > > >> >>> > comparison for dependencies-plugin install:
> > > > >> >>> >
> > > > >> >>> > No browserify:
> > > > >> >>> >
> > > > >> >>> > real 0m9.546s
> > > > >> >>> > user 0m4.673s
> > > > >> >>> > sys 0m0.692s
> > > > >> >>> >
> > > > >> >>> > Browserify:
> > > > >> >>> > real 0m9.861s
> > > > >> >>> > user 0m4.759s
> > > > >> >>> > sys 0m0.648s
> > > > >> >>> >
> > > > >> >>> > All cordova-lib tests are passing so I am assuming this has
> > > > minimal
> > > > >> >>> > impact but LET ME KNOW otherwise.
> > > > >> >>> >
> > > > >> >>> > Anis
> > > > >> >>> >
> > > > >> >>
> > > > >> >>
> > > > >> >
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > <http://www.wizcorp.jp/>Ally Ogilvie
> > > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > > ------------------------------
> > > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > > Facebook
> > > <http://www.facebook.com/Wizcorp> | LinkedIn
> > > <http://www.linkedin.com/company/wizcorp>
> > >
> >
>

Re: Browserify JS is in

Posted by Michal Mocny <mm...@chromium.org>.
I think Ally may be confusing what this does?: This browserify work is not
a way to get cordova to run in a desktop browser, its just a means for
packaging cordova.js.  I think there should be no visible change to end
users.

There is a separate effort to target the browser as a platform, and it may
be true that the browserify work helps with that, but its not directly
related.


On Mon, Jul 7, 2014 at 3:58 PM, Anis KADRI <an...@gmail.com> wrote:

> On Sun, Jun 29, 2014 at 9:54 PM, Ally Ogilvie <ao...@wizcorp.jp> wrote:
>
> > Anis that is really sweet.
> > If this hits CLI, plugin.xml will have sections for plugins to do web
> > actions?
> >
>
> Not sure I understand what you mean by web actions.
>
>
> > TBH.. i've always wanted a cordova platform add web... but i'd be happy
> > enough with a prepare for browser only mode.
> >
>
> `cordova platform add web` is part of the plan.
>
>
> >
> > Seeing a lot of use cases (e.g. Facebook plugin etc.) where there are JS,
> > iOS & Android SDKs and a Cordova Plugin wants to support the same API on
> > all platforms.
> >
>
> Didn't think of that but it is applicable indeed.
>
>
> >
> >
> >
> > On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI <an...@gmail.com>
> wrote:
> >
> > > Ok cool. I can look at adding a --browserify option for run and
> prepare.
> > I
> > > logged an issue for it [1]
> > >
> > > [1] https://issues.apache.org/jira/browse/CB-7001
> > >
> > >
> > > On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve <ag...@chromium.org>
> > > wrote:
> > >
> > > > Thanks Anis!
> > > >
> > > > Tougher for CLI since it's actually the prepare step that creates
> > > > cordova_plugins.js, but longer term (medium term?) I don't see why we
> > > > shouldn't just turn it on always anyways.
> > > >
> > > > So... Maybe cordova prepare --browserify?
> > > > Build prepares first, so will also need: cordova run android
> > --browserify
> > > >
> > > > I haven't looked at it yet. Google IO is next week and it's been
> > > consuming
> > > > most of our time the last few weeks. Will definitely play with it
> next
> > > next
> > > > week though!
> > > >
> > > >
> > > >
> > > > On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI <an...@gmail.com>
> > > wrote:
> > > >
> > > >> Sorry. I forgot you asked the question. There was no issue but there
> > is
> > > >> one now.
> > > >> https://issues.apache.org/jira/browse/CB-6990
> > > >>
> > > >> This "feature" is plugman only for now. How important is it to wire
> it
> > > >> to CLI ? Have  you guys had time to test it out yet ? How would it
> > > >> work with CLI ? Add another flag such as "cordova plugin add
> > > >> --browserify" ?
> > > >>
> > > >> On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve <
> agrieve@chromium.org>
> > > >> wrote:
> > > >> > bump
> > > >> >
> > > >> >
> > > >> > On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve <
> > agrieve@chromium.org
> > > >
> > > >> > wrote:
> > > >> >>
> > > >> >> Cool, yes! Thanks for the update!
> > > >> >>
> > > >> >> Is there a JIRA for this? Was asked in
> > > >> >> https://issues.apache.org/jira/browse/CB-5671.
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >> On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny <
> > mmocny@chromium.org>
> > > >> >> wrote:
> > > >> >>>
> > > >> >>> Awesome Anis.
> > > >> >>>
> > > >> >>> Will gladly take a look at this later today.  Just wanted to
> send
> > a
> > > >> quick
> > > >> >>> thanks for landing this this way, and for the useful report.
> > > >> >>>
> > > >> >>> -Michal
> > > >> >>>
> > > >> >>>
> > > >> >>> On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI <
> anis.kadri@gmail.com
> > >
> > > >> wrote:
> > > >> >>>
> > > >> >>> > Yo,
> > > >> >>> >
> > > >> >>> > Just wanted to let everyone know that I added browserify
> support
> > > to
> > > >> >>> > plugman (behind a flag for now). CLI is not hooked to this
> yet.
> > > Here
> > > >> >>> > is how it works:
> > > >> >>> >
> > > >> >>> > plugman install --browserify --plugin [PLUGIN] --platform
> > > [PLATFORM]
> > > >> >>> > --project [PROJECT_PATH]
> > > >> >>> >
> > > >> >>> > will generate a browserify version of cordova.js. Plugins and
> > > >> >>> > everything is bundled in. This version passes mobile-spec on
> iOS
> > > and
> > > >> >>> > Android. I am not yet setup to test other platforms.
> > > >> >>> >
> > > >> >>> > plugman install --plugin [PLUGIN] --platform [PLATFORM]
> > --project
> > > >> >>> > [PROJECT_PATH]
> > > >> >>> >
> > > >> >>> > Will continue to generate cordova.js the way it used to.
> > > >> >>> >
> > > >> >>> > Because some of you really care about benchmarks here is some
> > > >> >>> > comparison for dependencies-plugin install:
> > > >> >>> >
> > > >> >>> > No browserify:
> > > >> >>> >
> > > >> >>> > real 0m9.546s
> > > >> >>> > user 0m4.673s
> > > >> >>> > sys 0m0.692s
> > > >> >>> >
> > > >> >>> > Browserify:
> > > >> >>> > real 0m9.861s
> > > >> >>> > user 0m4.759s
> > > >> >>> > sys 0m0.648s
> > > >> >>> >
> > > >> >>> > All cordova-lib tests are passing so I am assuming this has
> > > minimal
> > > >> >>> > impact but LET ME KNOW otherwise.
> > > >> >>> >
> > > >> >>> > Anis
> > > >> >>> >
> > > >> >>
> > > >> >>
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > <http://www.wizcorp.jp/>Ally Ogilvie
> > Lead Developer - MobDev. | Wizcorp Inc. <http://www.wizcorp.jp/>
> > ------------------------------
> > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
> > <http://www.wizcorp.jp/> | Twitter <https://twitter.com/Wizcorp> |
> > Facebook
> > <http://www.facebook.com/Wizcorp> | LinkedIn
> > <http://www.linkedin.com/company/wizcorp>
> >
>