cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From riknoll <...@git.apache.org>
Subject [GitHub] cordova-lib pull request #449: CB-11023 Add edit-config functionality
Date Thu, 09 Jun 2016 17:39:17 GMT
Github user riknoll commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/449#discussion_r66486389
  
    --- Diff: cordova-common/src/ConfigChanges/ConfigChanges.js ---
    @@ -125,12 +128,32 @@ function remove_plugin_changes(pluginInfo, is_top_level) {
     
     
     PlatformMunger.prototype.add_plugin_changes = add_plugin_changes;
    -function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment)
{
    +function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment,
plugin_force) {
         var self = this;
         var platform_config = self.platformJson.root;
    +    var editConfigChanges = pluginInfo.getEditConfigs(self.platform);
    +    var config_munge;
     
    -    // get config munge, aka how should this plugin change various config files
    -    var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars);
    +    if (!editConfigChanges || editConfigChanges.length === 0) {
    +        // get config munge, aka how should this plugin change various config files
    +        config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars);
    +    }
    +    else if (plugin_force) {
    +        CordovaLogger.get().log(CordovaLogger.WARN, '--force is used. edit-config will
overwrite any conflicts');
    --- End diff --
    
    I would add "conflicting plugins may not work as expected" to the end of this warning
(or something to that effect)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message