cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From riknoll <>
Subject [GitHub] cordova-lib pull request: CB-11023 Add attribute through config-fi...
Date Thu, 19 May 2016 22:16:17 GMT
Github user riknoll commented on the pull request:
    I think that the issue might be that we need to separate inserting child elements and
editing existing ones. Something like this:
    <!-- Editing attributes in existing elements -->
    <edit-config target="xpath/nonsense" mode="merge|overwrite">
        <attribute name="attr" new-value="edited" />
    <!-- Existing config-file insert behavior -->
    <insert-config parent="xpath/nonsense">
        <child-element />
    This is a bit more verbose if you have a lot of edits that need to be performed, but much
more flexible because the xpath selector can be used to reference specific elements, even
in lists. It might also help with detecting plugin conflicts. I don't care about the names
of those tags (we can keep using config-file if we want).
    For plugin conflicts, detection should probably happen at "plugin add" time. The add should
fail on conflict and allow the user to override it using `--force` if they want to. As for
which plugin gets dibs in the forced add scenario, it doesn't really matter as long as it
is consistent. Hopefully the user can determine the correct value on conflict and fix it by
editing the config from the project's `config.xml`. 

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message