You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Mark Koudritsky (JIRA)" <ji...@apache.org> on 2013/11/09 16:42:18 UTC

[jira] [Commented] (CB-3954) jsmodule name attribute can't be reused in plugin.xml

    [ https://issues.apache.org/jira/browse/CB-3954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13818174#comment-13818174 ] 

Mark Koudritsky commented on CB-3954:
-------------------------------------

Just to document it here. Plugman is absolutely ok with both - using the same name="Entry" or not using a name attribute at all. If no name is given it will use the file name (without extension) to construct the ID (in the example above the file is Entry.js). In both cases the following entry is added to cordova_plugins.js
    {
        "file": "plugins/org.apache.cordova.file/www/ios/Entry.js",
        "id": "org.apache.cordova.file.Entry",
        "merges": [
            "window.Entry"
        ]
    }

I'm looking into what needs to be changed in cordova.js to properly use the two entries with the same id.

> jsmodule name attribute can't be reused in plugin.xml
> -----------------------------------------------------
>
>                 Key: CB-3954
>                 URL: https://issues.apache.org/jira/browse/CB-3954
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS, Plugman
>    Affects Versions: 2.9.0
>            Reporter: Steve Gill
>            Assignee: Mark Koudritsky
>            Priority: Minor
>
> Not sure if bug or intended. For the file plugin (and some other plugins), platform specific js exists. In file's case, two entry.js files exist. One is in common, and one is ios specific. The ios one is supposed to merge into the common one. Jsmodules support merging. These are the two jsmodule blocks I am working with.
> <js-module src="www/Entry.js" name="Entry">
>     <clobbers target="window.Entry" />
> </js-module> 
> This one is nested in the ios platform tag
> <js-module src="www/ios/Entry.js" name="Entry">
>     <merges target="window.Entry" />
> </js-module>
> The ios specific JS does not merge in this case. To fix this, I just had to change the name attribute on the ios specific jsmodule call. I changed it to Entry1 instead of Entry. This does the trick. 
> This is probably not a bug, but people might run into it. I suggest adding it to the docs?
> Thoughts?



--
This message was sent by Atlassian JIRA
(v6.1#6144)