Hi Vladimir,

Thank you for pointing out these issues to me.  The first one has actually been 
handled already, there is a PR waiting that adds the browserify option in the 
CLI.
https://github.com/apache/cordova-cli/pull/185

And for the second I just pushed a change that takes care of this by passing in 
the value of 'is_top_level'.

Regards,
Suraj.



On Monday, August 4, 2014 4:55 AM, Vladimir Kotikov 
<vladimir.koti...@akvelon.com> wrote:
 


Tested this with windows and android platforms and found two issues:

    1.  'browserify' option is not passed down to `cordova platform/plugin` 
commands. It seems that additional property `browserify: args.browserify` need 
to be added to download_opts in cli.js near line 273.
    
2.  When I add some plugins using `cordova plugin add --browserify` and after 
that run `cordova prepare --browserify` the project is seems to be broken (no 
plugins added to cordova.js).
Seems that problem is at line 110 in plugman/prepare-browserify.js 
(`is_top_level` is undefined, when this method called from cordova/prepare.js 
and this will always return without adding any plugin to cordova.js).

---------------
Best regards, Vladimir


-----Original Message-----
From: Steven Gill [mailto:stevengil...@gmail.com] 
Sent: Friday, 1 August, 2014 0:29
To: dev@cordova.apache.org; Suraj Pindoria
Subject: Re: Browserify support for cordova-lib/cordova-cli

This looks good to me. Anyone else want to test it before I merge it in?


On Wed, Jul 30, 2014 at 3:38 PM, Suraj Pindoria < 
suraj.pindo...@yahoo.com.invalid> wrote:

> So I updated this to include some of the additional use cases 
> discussed earlier.  Now, running "cordova prepare --browserify" in an 
> existing project will update it use prepare-browserify.  It also works 
> with "cordova run --browserify".  Adding and removing plugins should 
> still use the "--browserify" flag.
>
> Please try it out and let me know if there are any other use cases 
> that are still missing.
>
> Thanks,
> Suraj.
>
>
> On Tuesday, July 29, 2014 7:35 PM, Michal Mocny <mmo...@chromium.org>
> wrote:
>
>
>
> Sounds like a setting that would go well in .cordova/config.json, I think.
>
> -Michal
>
>
>
> On Tue, Jul 29, 2014 at 6:10 PM, Steven Gill <stevengil...@gmail.com>
> wrote:
>
> > Decided to add a few more issues and organize around a master issue.
> >
> > https://issues.apache.org/jira/browse/CB-7190
> >
> > If you guys think of other use cases, let us know!
> >
> >
> > On Tue, Jul 29, 2014 at 2:47 PM, Suraj Pindoria < 
> > suraj.pindo...@yahoo.com.invalid> wrote:
> >
> > > Right now it only works when you add the plugins with the flag.
> > >
> > > Current working use case:
> > > -Create a project
> > > -Add platform
> > > -Add plugins with browserify flag
> > >
> > > Adding a platform after does not use the proper browserify-prepare.
> > >  Obviously an issue.
> > >
> > > We just realized an issue we need to solve first.
> > > https://issues.apache.org/jira/browse/CB-7227
> > >
> > > Also, the case for "cordova prepare --browserify" on an existing
> project
> > > needs to be handled.
> > >
> > > We are also thinking about saving the browserify flag, so that way 
> > > we
> do
> > > not need to keep adding the flag after it has been used once.  
> > > Where
> > would
> > > be the best place to save this?
> > > "cordova create --browserify test com.example.test browserifyTest"
> > > Saves browserify flag for use throughout the project.
> > >
> > > Suraj.
> > >
> > >
> > > On Tuesday, July 29, 2014 2:21 PM, Michal Mocny 
> > > <mmo...@chromium.org>
> > > wrote:
> > >
> > >
> > >
> > > Just to confirm: Can I run "cordova prepare --browserify" is any
> existing
> > > workspace, or would I have needed to add all plugins / platforms 
> > > with
> > that
> > > flag as well?
> > >
> > > -Michal
> > >
> > >
> > >
> > > On Tue, Jul 29, 2014 at 3:27 PM, Steven Gill 
> > > <stevengil...@gmail.com>
> > > wrote:
> > >
> > > > cordova prepare --browserify works too
> > > >
> > > > https://issues.apache.org/jira/browse/CB-7001
> > > > https://issues.apache.org/jira/browse/CB-7190
> > > >
> > > >
> > > > On Tue, Jul 29, 2014 at 12:02 PM, Suraj Pindoria < 
> > > > suraj.pindo...@yahoo.com.invalid> wrote:
> > > >
> > > > > Hi everyone,
> > > > >
> > > > > I have been working with Anis and Steve to add browserify 
> > > > > support
> in
> > > > > cordova-lib and cordova-cli.  They way this is being done is
> through
> > a
> > > > flag
> > > > > in the CLI which then calls prepare-browserify versus the 
> > > > > standard
> > > > prepare,
> > > > > an example:
> > > > > "cordova plugin --browserify add org.apache.cordova.*"
> > > > > "cordova plugin --browserify rm org.apache.cordova.*"
> > > > >
> > > > >
> > > > > So far it has only been tested using iOS and Android and 
> > > > > requires
> > that
> > > > the
> > > > > browserify flag is present whenever you add or remove a plugin.
> Let
> > me
> > > > > know if you have any questions or concerns.
> > > > >
> > > > > https://github.com/apache/cordova-lib/pull/66
> > > > >
> > > > > https://github.com/apache/cordova-cli/pull/185
> > > > >
> > > > >
> > > > > Thanks,
> > > > > Suraj.
> > > >
> > >
> >
>

Reply via email to