Github user vladimir-kotikov commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/259#discussion_r34557461
--- Diff: cordova-lib/src/cordova/prepare.js ---
@@ -106,28 +106,29 @@ function prepare(options) {
if (options.browserify) {
plugman.prepare = require('../plugman/prepare-browserify');
}
- plugman.prepare(platformPath, platform, plugins_dir, null,
true, pluginInfoProvider);
-
- // Make sure that config changes for each existing plugin is
in place
- var platformJson = PlatformJson.load(plugins_dir, platform);
- var munger = new PlatformMunger(platform, platformPath,
plugins_dir, platformJson, pluginInfoProvider);
- munger.reapply_global_munge();
- munger.save_all();
-
- // Update platform config.xml based on top level config.xml
- var cfg = new ConfigParser(xml);
- var platform_cfg = new ConfigParser(parser.config_xml());
- exports._mergeXml(cfg.doc.getroot(),
platform_cfg.doc.getroot(), platform, true);
-
- // CB-6976 Windows Universal Apps. For smooth transition and
to prevent mass api failures
- // we allow using windows8 tag for new windows platform
- if (platform == 'windows') {
- exports._mergeXml(cfg.doc.getroot(),
platform_cfg.doc.getroot(), 'windows8', true);
- }
-
- platform_cfg.write();
-
- return parser.update_project(cfg);
+ var preparePromise = plugman.prepare(platformPath, platform,
plugins_dir, null, true, pluginInfoProvider);
+ return Q(preparePromise).then(function () {
--- End diff --
Actually `plugman.prepare` doesn't return promise, but `prepare-browserify`
does. To handle both of them we need to wrap call into promise forcibly.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]