You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/10/02 06:06:51 UTC

[1/2] git commit: [windows8][CB-4943] .appxmanifest should be treated like .xml, not like a plist-xml

Updated Branches:
  refs/heads/cordova-3.1.x 308a94f19 -> b64da5b0d


[windows8][CB-4943] .appxmanifest should be treated like .xml, not like a plist-xml


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/4ea41d2f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/4ea41d2f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/4ea41d2f

Branch: refs/heads/cordova-3.1.x
Commit: 4ea41d2f612094144c0119f28c7082a3a1539fb2
Parents: 308a94f
Author: purplecabbage <pu...@gmail.com>
Authored: Mon Sep 30 18:11:26 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Tue Oct 1 06:46:33 2013 -0700

----------------------------------------------------------------------
 src/util/config-changes.js | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/4ea41d2f/src/util/config-changes.js
----------------------------------------------------------------------
diff --git a/src/util/config-changes.js b/src/util/config-changes.js
index 7ebd8b8..e3e6539 100644
--- a/src/util/config-changes.js
+++ b/src/util/config-changes.js
@@ -17,7 +17,7 @@
  *
 */
 
-/* 
+/*
  * This module deals with shared configuration / dependency "stuff". That is:
  * - XML configuration files such as config.xml, AndroidManifest.xml or WMAppManifest.xml.
  * - plist files in iOS
@@ -70,7 +70,7 @@ module.exports = {
     get_platform_json:function(plugins_dir, platform) {
         checkPlatform(platform);
 
-        var filepath = path.join(plugins_dir, platform + '.json'); 
+        var filepath = path.join(plugins_dir, platform + '.json');
         if (fs.existsSync(filepath)) {
             return JSON.parse(fs.readFileSync(filepath, 'utf-8'));
         } else {
@@ -87,7 +87,7 @@ module.exports = {
     save_platform_json:function(config, plugins_dir, platform) {
         checkPlatform(platform);
 
-        var filepath = path.join(plugins_dir, platform + '.json'); 
+        var filepath = path.join(plugins_dir, platform + '.json');
         fs.writeFileSync(filepath, JSON.stringify(config), 'utf-8');
     },
     generate_plugin_config_munge:function(plugin_dir, platform, project_dir, vars) {
@@ -179,7 +179,7 @@ module.exports = {
         var config_munge = module.exports.generate_plugin_config_munge(plugin_dir, platform, project_dir, plugin_vars);
         // global munge looks at all plugins' changes to config files
         var global_munge = platform_config.config_munge;
-        
+
         var plistObj, pbxproj;
         if (platform == 'ios') {
             if (global_munge['plugins-plist'] && config_munge['plugins-plist']) {
@@ -196,7 +196,7 @@ module.exports = {
                 pbxproj = ios_parser.parseIOSProjectFiles(project_dir);
             }
         }
-        
+
         // Traverse config munge and decrement global munge
         Object.keys(config_munge).forEach(function(file) {
             if (file == 'plugins-plist' && platform == 'ios') {
@@ -237,7 +237,13 @@ module.exports = {
                                         // config.xml referenced in ios config changes refer to the project's config.xml, which we need to glob for.
                                         var filepath = resolveConfigFilePath(project_dir, platform, file);
                                         if (fs.existsSync(filepath)) {
-                                            if (path.extname(filepath) == '.xml') {
+
+                                            // look at ext and do proper config change based on file type
+                                            var ext = path.extname(filepath);
+                                            // Windows8 uses an appxmanifest, and wp8 will likely use
+                                            // the same in a future release
+                                            // TODO: consider proper xml file detection, via <?xml version='1.0' encoding='utf-8'?>
+                                            if (ext == '.xml' || ext == '.appxmanifest') {
                                                 var xml_to_prune = [et.XML(xml_child)];
                                                 var doc = xml_helpers.parseElementtreeSync(filepath);
                                                 if (xml_helpers.pruneXML(doc, xml_to_prune, selector)) {
@@ -283,7 +289,7 @@ module.exports = {
     add_plugin_changes:function(platform, project_dir, plugins_dir, plugin_id, plugin_vars, is_top_level, should_increment) {
         var platform_config = module.exports.get_platform_json(plugins_dir, platform);
         var plugin_dir = path.join(plugins_dir, plugin_id);
-        
+
         plugin_id = xml_helpers.parseElementtreeSync(path.join(plugin_dir, 'plugin.xml'), 'utf-8')._root.attrib['id'];
 
         // get config munge, aka how should this plugin change various config files
@@ -307,7 +313,7 @@ module.exports = {
                 pbxproj = ios_parser.parseIOSProjectFiles(project_dir);
             }
         }
-        
+
         // Traverse config munge and decrement global munge
         Object.keys(config_munge).forEach(function(file) {
             if (!global_munge[file]) {
@@ -328,7 +334,7 @@ module.exports = {
                         fs.writeFileSync(plistfile, plist.build(plistObj));
                     }
                 } else {
-                    // Handle arbitrary XML OR pbxproj framework stuff  
+                    // Handle arbitrary XML OR pbxproj framework stuff
                     if (!global_munge[file][selector]) {
                         global_munge[file][selector] = {};
                     }
@@ -418,7 +424,7 @@ module.exports = {
         platform_config.prepare_queue.installed.forEach(function(u) {
             module.exports.add_plugin_changes(platform, project_dir, plugins_dir, u.plugin, u.vars, u.topLevel, true);
         });
-        
+
         platform_config = module.exports.get_platform_json(plugins_dir, platform);
 
         // Empty out uninstalled queue.
@@ -433,7 +439,7 @@ module.exports = {
 // determine if a plist file is binary
 function isBinaryPlist(filename) {
     // I wish there was a synchronous way to read only the first 6 bytes of a
-    // file. This is wasteful :/ 
+    // file. This is wasteful :/
     var buf = '' + fs.readFileSync(filename, 'utf8');
     // binary plists start with a magic header, "bplist"
     return buf.substring(0, 6) === 'bplist';


[2/2] git commit: updated version to 0.13.0

Posted by st...@apache.org.
updated version to 0.13.0


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/b64da5b0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/b64da5b0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/b64da5b0

Branch: refs/heads/cordova-3.1.x
Commit: b64da5b0dbe48333fd5461efdb388cf810d7ec41
Parents: 4ea41d2
Author: Steven Gill <st...@gmail.com>
Authored: Tue Oct 1 20:39:23 2013 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Tue Oct 1 20:39:23 2013 -0700

----------------------------------------------------------------------
 RELEASENOTES.md | 6 ++++++
 package.json    | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b64da5b0/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 798817e..a24b440 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -1,5 +1,11 @@
 # Changelog
 
+## 0.13.0
+
+### Features
+
+- Windows 8 Support
+
 ## 0.12.0
 
 ### Features

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b64da5b0/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index fbf19e9..73eeec7 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
   "author": "Andrew Lunny <al...@gmail.com>",
   "name": "plugman",
   "description": "install/uninstall Cordova plugins",
-  "version": "0.12.0",
+  "version": "0.13.0",
   "repository": {
     "type": "git",
     "url": "git://git-wip-us.apache.org/repos/asf/cordova-plugman.git"