cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [08/23] git commit: [CB-4207] Support for custom lib in windows.
Date Wed, 24 Jul 2013 23:07:28 GMT
[CB-4207] Support for custom lib in windows.


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

Branch: refs/heads/plugman-registry
Commit: 9fae7ead64ef085afca1903c063892b86ca607af
Parents: 7702f71
Author: Fil Maj <maj.fil@gmail.com>
Authored: Tue Jul 16 13:15:43 2013 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Tue Jul 16 13:15:43 2013 -0700

----------------------------------------------------------------------
 src/config.js    | 1 +
 src/lazy_load.js | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/9fae7ead/src/config.js
----------------------------------------------------------------------
diff --git a/src/config.js b/src/config.js
index ca41ee6..f6c7b88 100644
--- a/src/config.js
+++ b/src/config.js
@@ -59,6 +59,7 @@ module.exports.has_custom_path = function(project_root, platform) {
     if (json.lib && json.lib[platform]) {
         var uri = url.parse(json.lib[platform].uri);
         if (!(uri.protocol)) return uri.path;
+        else if (uri.protocol && uri.protocol[1] ==':') return uri.href;
     }
     return false;
 };

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/9fae7ead/src/lazy_load.js
----------------------------------------------------------------------
diff --git a/src/lazy_load.js b/src/lazy_load.js
index 3ca566e..8566514 100644
--- a/src/lazy_load.js
+++ b/src/lazy_load.js
@@ -63,7 +63,7 @@ module.exports = {
             version:version
         }, function() {
             var uri = URL.parse(url);
-            if (uri.protocol) {
+            if (uri.protocol && uri.protocol[1] != ':') { // second part of conditional
is for awesome windows support. fuuu windows
                 shell.mkdir('-p', download_dir);
                 events.emit('log', 'Requesting ' + url + '...');
                 var size = 0;
@@ -95,7 +95,7 @@ module.exports = {
             } else {
                 // local path
                 // symlink instead of copying
-                fs.symlinkSync(uri.path, download_dir, 'dir');
+                fs.symlinkSync((uri.protocol && uri.protocol[1] == ':' ? uri.href
: uri.path), download_dir, 'dir');
                 hooker.fire('after_library_download', {
                     platform:platform,
                     url:url,


Mime
View raw message