You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/03/06 01:13:35 UTC
[08/13] git commit: CB-5970 added type attribute 'projectReference'
to element to signal addition of dependent project
CB-5970 added type attribute 'projectReference' to <framework> element to signal addition of dependent project
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/53329941
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/53329941
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/53329941
Branch: refs/heads/master
Commit: 533299416146f54f12b75d8a2824e5e6259cdd1d
Parents: 944f0f4
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Mar 3 14:39:38 2014 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Mar 3 14:39:38 2014 -0800
----------------------------------------------------------------------
src/platforms/windows8.js | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/53329941/src/platforms/windows8.js
----------------------------------------------------------------------
diff --git a/src/platforms/windows8.js b/src/platforms/windows8.js
index 43f55bc..f859914 100644
--- a/src/platforms/windows8.js
+++ b/src/platforms/windows8.js
@@ -94,18 +94,17 @@ module.exports = {
var src = el.attrib['src'];
var dest = src; // if !isCustom, we will just add a reference to the file in place
- var isCustom = el.attrib.custom == "true";
+ // technically it is not possible to get here without isCustom == true -jm
+ // var isCustom = el.attrib.custom == "true";
var type = el.attrib["type"];
- if(isCustom) {
- dest = path.join('plugins', plugin_id, path.basename(src));
- common.copyFile(plugin_dir, src, project_dir, dest);
- }
-
if(type == "projectReference") {
-
+ project_file.addProjectReference(path.join(plugin_dir,src));
}
else {
+ // if(isCustom) {}
+ dest = path.join('plugins', plugin_id, path.basename(src));
+ common.copyFile(plugin_dir, src, project_dir, dest);
project_file.addReference(dest,src);
}
@@ -114,14 +113,19 @@ module.exports = {
require('../../plugman').emit('verbose', 'windows8 framework uninstall :: ' + plugin_id );
var src = el.attrib['src'];
- var isCustom = el.attrib.custom == "true";
+ // technically it is not possible to get here without isCustom == true -jm
+ // var isCustom = el.attrib.custom == "true";
+ var type = el.attrib["type"];
- if(isCustom) {
- var dest = path.join('plugins', plugin_id);//, path.basename(src));
- common.removeFile(project_dir, dest);
+ if(type == "projectReference") {
+ project_file.removeProjectReference(path.join(plugin_dir,src));
+ }
+ else {
+ // if(isCustom) { }
+ var targetPath = path.join('plugins', plugin_id);
+ common.removeFile(project_dir, targetPath);
+ project_file.removeReference(src);
}
-
- project_file.removeReference(src);
}
}