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 D6B24200BBC for ; Sun, 13 Nov 2016 15:39:58 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D5401160AF8; Sun, 13 Nov 2016 14:39:58 +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 2A899160AF2 for ; Sun, 13 Nov 2016 15:39:58 +0100 (CET) Received: (qmail 87733 invoked by uid 500); 13 Nov 2016 14:39:57 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 87714 invoked by uid 99); 13 Nov 2016 14:39:56 -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; Sun, 13 Nov 2016 14:39:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CF6E7DFE5C; Sun, 13 Nov 2016 14:39:56 +0000 (UTC) From: matrosov-nikita To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-windows pull request #207: Move windows-specific logic from cordova-... Content-Type: text/plain Message-Id: <20161113143956.CF6E7DFE5C@git1-us-west.apache.org> Date: Sun, 13 Nov 2016 14:39:56 +0000 (UTC) archived-at: Sun, 13 Nov 2016 14:39:59 -0000 Github user matrosov-nikita commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/207#discussion_r87713717 --- Diff: template/cordova/lib/PluginInfo.js --- @@ -0,0 +1,109 @@ +var semver = require('semver'); +var CommonPluginInfo = require('cordova-common').PluginInfo; + +var MANIFESTS = { + 'windows': { + '8.1.0': 'package.windows.appxmanifest', + '10.0.0': 'package.windows10.appxmanifest' + }, + 'phone': { + '8.1.0': 'package.phone.appxmanifest', + '10.0.0': 'package.windows10.appxmanifest' + }, + 'all': { + '8.1.0': ['package.windows.appxmanifest', 'package.phone.appxmanifest'], + '10.0.0': 'package.windows10.appxmanifest' + } +}; + +/* +A class for holidng the information currently stored in plugin.xml +It's inherited from cordova-common's PluginInfo class +In addition it overrides getConfigFiles method to use windows-specific logic + */ +function PluginInfo(dirname) { + CommonPluginInfo.apply(this, arguments); + var parentGetConfigFiles = this.getConfigFiles; + this.getConfigFiles = function(platform) { + var changes = parentGetConfigFiles(platform); + var editChanges = this.getEditConfigs(platform); + if (editChanges && editChanges.length !== 0) { + changes.push(editChanges); + } + // Demux 'package.appxmanifest' into relevant platform-specific appx manifests. + // Only spend the cycles if there are version-specific plugin settings + if (changes.some(function(change) { + return change.target === 'package.appxmanifest'; --- End diff -- In cordova-common we'll get ready changes and push them again. (see also https://github.com/apache/cordova-lib/blob/master/cordova-common/src/ConfigChanges/ConfigChanges.js#L365). So, I suppose, that we needn't release cordova-common before platform release. --- 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