var path = require('path');
var et = require('elementtree');
var ConfigKeeper = require('./ConfigKeeper');
-var CordovaLogger = require('../CordovaLogger');
+var events = require('../events');
var mungeutil = require('./munge-util');
var xml_helpers = require('../util/xml-helpers');
' cannot be added. <edit-config> changes in this plugin conflicts with <edit-config> changes in config.xml. Conflicts must be resolved before plugin can be added.');
}
if (plugin_force) {
- CordovaLogger.get().log(CordovaLogger.WARN, '--force is used. edit-config will overwrite conflicts if any. Conflicting plugins may not work as expected.');
+ events.emit('warn', '--force is used. edit-config will overwrite conflicts if any. Conflicting plugins may not work as expected.');
// remove conflicting munges
var conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge);
}
}
if (Object.keys(isConflictingInfo.conflictingMunge.files).length !== 0) {
- CordovaLogger.get().log(CordovaLogger.WARN, 'Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes');
+ events.emit('warn', 'Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes');
// remove conflicting plugin.xml munges
conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge);
this.cdvNamespacePrefix = getCordovaNamespacePrefix(this.doc);
et.register_namespace(this.cdvNamespacePrefix, 'http://cordova.apache.org/ns/1.0');
} catch (e) {
- console.error('Parsing ' + path + ' failed');
+ events.emit('error', 'Parsing ' + path + ' failed');
throw e;
}
var r = this.doc.getroot();