You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Andrew Grieve <ag...@chromium.org> on 2013/09/05 04:02:06 UTC

Re: Module name & plugin id

Good point about "clobbers" not making a tonne of sense.

How about adding an alias:

<js-module ...>
  <export-as-symbol name="window.CameraPopoverOptions"/>
</js-module>

For <merges>:

<js-module ...>
  <export-as-symbol name="window.CameraPopoverOptions" merge="true"/>
</js-module>




On Sat, Aug 31, 2013 at 12:57 PM, Jonathan Bond-Caron <
jbondc@gdesolutions.com> wrote:

> > Is there any reason why the 'module name' isn't the plugin id (when
> loading
> > JavaScript):
> >
> https://github.com/apache/cordova-plugman/blob/master/src/prepare.js#L149
> >
>
> In case it helps someone, plugins can have multiple js-module declarations:
>
>     <js-module src="www/CameraPopoverOptions.js"
> name="CameraPopoverOptions">
>         <clobbers target="CameraPopoverOptions" />
>     </js-module>
>
> This name is appended to the plugin id.
>
> Note: the meaning of "clobbers target" isn't obvious, a suggestion for a
> more obvious name could be:
>     <js-module>
>         <assign var="CameraPopoverOptions" />
>     </js-module>
>
>

Re: Module name & plugin id

Posted by Andrew Grieve <ag...@chromium.org>.
https://issues.apache.org/jira/browse/CB-4757


On Fri, Sep 6, 2013 at 1:28 PM, Brian LeRoux <b...@brian.io> wrote:

> export aligns better w/ es6 modules too
>
>
> On Thu, Sep 5, 2013 at 3:57 AM, jbondc@openmv.com <jb...@openmv.com>
> wrote:
>
> > On Wed Sep 4 10:02 PM, Andrew Grieve wrote:
> > > How about adding an alias:
> > >
> > > <js-module ...>
> > >   <export-as-symbol name="window.CameraPopoverOptions"/>
> > > </js-module>
> > >
> > > For <merges>:
> > >
> > > <js-module ...>
> > >   <export-as-symbol name="window.CameraPopoverOptions" merge="true"/>
> > > </js-module>
> > >
> >
> > +1 for export, maybe simpler as
> >
> > <export name="window.CameraPopoverOptions" merge="true"/>
> >
> >
>

Re: Module name & plugin id

Posted by Brian LeRoux <b...@brian.io>.
export aligns better w/ es6 modules too


On Thu, Sep 5, 2013 at 3:57 AM, jbondc@openmv.com <jb...@openmv.com> wrote:

> On Wed Sep 4 10:02 PM, Andrew Grieve wrote:
> > How about adding an alias:
> >
> > <js-module ...>
> >   <export-as-symbol name="window.CameraPopoverOptions"/>
> > </js-module>
> >
> > For <merges>:
> >
> > <js-module ...>
> >   <export-as-symbol name="window.CameraPopoverOptions" merge="true"/>
> > </js-module>
> >
>
> +1 for export, maybe simpler as
>
> <export name="window.CameraPopoverOptions" merge="true"/>
>
>

RE: Module name & plugin id

Posted by "jbondc@openmv.com" <jb...@openmv.com>.
On Wed Sep 4 10:02 PM, Andrew Grieve wrote:
> How about adding an alias:
> 
> <js-module ...>
>   <export-as-symbol name="window.CameraPopoverOptions"/>
> </js-module>
> 
> For <merges>:
> 
> <js-module ...>
>   <export-as-symbol name="window.CameraPopoverOptions" merge="true"/>
> </js-module>
> 

+1 for export, maybe simpler as

<export name="window.CameraPopoverOptions" merge="true"/>