Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 46BDF200BA7 for ; Fri, 7 Oct 2016 04:19:42 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 454DC160AED; Fri, 7 Oct 2016 02:19:42 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8A1EB160ADB for ; Fri, 7 Oct 2016 04:19:41 +0200 (CEST) Received: (qmail 16479 invoked by uid 500); 7 Oct 2016 02:19:40 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 16461 invoked by uid 99); 7 Oct 2016 02:19:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2016 02:19:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 89FD3E055E; Fri, 7 Oct 2016 02:19:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: steven@apache.org To: commits@cordova.apache.org Date: Fri, 07 Oct 2016 02:19:40 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] cordova-lib git commit: CB-11908 Handle edit-config in config.xml on prepare archived-at: Fri, 07 Oct 2016 02:19:42 -0000 Repository: cordova-lib Updated Branches: refs/heads/master 934757c0a -> 121fdc3f8 CB-11908 Handle edit-config in config.xml on prepare This closes #493 Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/59faf880 Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/59faf880 Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/59faf880 Branch: refs/heads/master Commit: 59faf88024faa697647dec1ddda045db8038edab Parents: 934757c Author: ktop Authored: Mon Sep 26 17:10:15 2016 -0400 Committer: Steve Gill Committed: Thu Oct 6 15:17:51 2016 -0700 ---------------------------------------------------------------------- cordova-lib/src/cordova/prepare.js | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/59faf880/cordova-lib/src/cordova/prepare.js ---------------------------------------------------------------------- diff --git a/cordova-lib/src/cordova/prepare.js b/cordova-lib/src/cordova/prepare.js index 00d50ad..9a5cdab 100644 --- a/cordova-lib/src/cordova/prepare.js +++ b/cordova-lib/src/cordova/prepare.js @@ -21,6 +21,7 @@ var cordova_util = require('./util'), ConfigParser = require('cordova-common').ConfigParser, PlatformJson = require('cordova-common').PlatformJson, PluginInfoProvider = require('cordova-common').PluginInfoProvider, + PlatformMunger = require('cordova-common').ConfigChanges.PlatformMunger, events = require('cordova-common').events, platforms = require('../platforms/platforms'), PlatformApiPoly = require('../platforms/PlatformApiPoly'), @@ -117,6 +118,13 @@ function preparePlatforms (platformList, projectRoot, options) { var browserify = require('../plugman/browserify'); return browserify(project, platformApi); } + }) + .then(function () { + // Handle edit-config in config.xml + var platformRoot = path.join(projectRoot, 'platforms', platform); + var platformJson = PlatformJson.load(platformRoot, platform); + var munger = new PlatformMunger(platform, platformRoot, platformJson); + munger.add_config_changes(project.projectConfig, /*should_increment=*/true).save_all(); }); }); })); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org