cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rakatyal <...@git.apache.org>
Subject [GitHub] cordova-windows pull request: CB-11066 Remove uap prefixed capabil...
Date Wed, 20 Apr 2016 16:32:35 GMT
Github user rakatyal commented on a diff in the pull request:

    https://github.com/apache/cordova-windows/pull/168#discussion_r60442924
  
    --- Diff: template/cordova/lib/ConfigChanges.js ---
    @@ -0,0 +1,85 @@
    +/*
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + *
    +*/
    +
    +var util = require('util');
    +var CommonMunger = require('cordova-common').ConfigChanges.PlatformMunger;
    +
    +function PlatformMunger(platform, project_dir, platformJson, pluginInfoProvider) {
    +    CommonMunger.apply(this, arguments);
    +}
    +
    +util.inherits(PlatformMunger, CommonMunger);
    +
    +/**
    + * This is an override of apply_file_munge method from cordova-common's PlatformMunger
class.
    + * In addition to parent's method logic also removes capabilities with 'uap:' prefix
that were
    + * added by AppxManifest class
    + *
    + * @param {String}  file   A file name to apply munge to
    + * @param {Object}  munge  Serialized changes that need to be applied to the file
    + * @param {Boolean} [remove=false] Flag that specifies whether the changes
    + *   need to be removed or added to the file
    + */
    +PlatformMunger.prototype.apply_file_munge = function (file, munge, remove) {
    +    // Call parent class' method
    +    PlatformMunger.super_.prototype.apply_file_munge.call(this, file, munge, remove);
    +
    +    // CB-11066 If this is a windows10 manifest and we're removing the changes
    +    // then we also need to check if there are <Capability> elements were previously
    +    // added and schedule removal of corresponding <uap:Capability> elements
    +    if (remove && file === 'package.windows10.appxmanifest') {
    --- End diff --
    
    Makes sense. Thanks.


---
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