cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matrosov-nikita <...@git.apache.org>
Subject [GitHub] cordova-windows pull request #207: Move windows-specific logic from cordova-...
Date Sun, 13 Nov 2016 14:39:56 GMT
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


Mime
View raw message