Hey Dan,

I just created a master issue to track remaining browserify work.
https://issues.apache.org/jira/browse/CB-8801

Unfortunately, I haven't had time to really work on this the last little
while.

1) I don't think it should be duplicating adding the JS. That sounds like a
bug

2) It is legacy. Might need to include a transform for it.

3) Is it an empty directory at this point? We should add code to not
generate it or remove it.

Any contributions would be greatly appreciated.

On Fri, Apr 3, 2015 at 1:44 PM, Dan Polivy <d...@cellartracker.com> wrote:

> Hi folks,
>
> Is there a single issue or location for tracking the latest status on the
> -browserify functionality in cordova? I've got cordova 4.3.0 installed and
> have been playing with this a bit, as it's a feature I'd very much like to
> use for our app! But, I have a few questions on how it's working, and
> couldn't find any official documentation on the current status and what
> should work/what doesn't. I'm not intimately familiar with the cordova
> code, but I'm happy to contribute back anything I can do to help make this
> work better.
>
> Here's what I'm currently running into:
>
>
> 1)      When I run 'cordova prepare -browserify', all I see is the
> original plugin JS files (in /plugins/<name>/www/) end up with the
> following appended to them (note, each time you prepare, it continues to
> append another iteration):
>
> window.navigator = window.navigator || {};
> window.navigator.camera = window.navigator.camera || {};
>
> require('cordova/builder').assignOrWrapInDeprecateGetter(window.navigator,
> 'camera', module.exports);
>
> It's usually duplicated in there 2-3 additional times after each run of
> prepare. Is that expected?
>
>
> 2)      cordova.define() doesn't seem to be defined in the browserify
> model. Is this a legacy plugin definition approach? I couldn't find any
> documentation about it, but I don't see it being used in any of the current
> Apache plugins. I'm running into it with the barcodescanner plugin (
> https://github.com/wildabeast/BarcodeScanner/blob/master/www/barcodescanner.js#L132);
> commenting it out seems to work fine. Does this need to be translated in
> the browserify code?
>
>
> 3)      Minor: the plugin www directories still exist in the output www
> folder, even though the JS isn't in there (since it is bundled into
> cordova.js).
>
> I'm not on the mailing list, so please include me directly in any replies.
>
> Thanks,
> Dan
>
>
>

Reply via email to