cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [23/34] js commit: adding cordova.require fake wrapper
Date Thu, 27 Mar 2014 14:22:32 GMT
adding cordova.require fake wrapper


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

Branch: refs/heads/browserify
Commit: 82d62c894b4459c6b17a9aedf8174db3226a5fa4
Parents: b03d19e
Author: Anis Kadri <anis@apache.org>
Authored: Thu Mar 27 15:04:34 2014 +0100
Committer: Anis Kadri <anis@apache.org>
Committed: Thu Mar 27 15:20:22 2014 +0100

----------------------------------------------------------------------
 src/cordova_b.js | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/82d62c89/src/cordova_b.js
----------------------------------------------------------------------
diff --git a/src/cordova_b.js b/src/cordova_b.js
index f4c781e..a00423c 100644
--- a/src/cordova_b.js
+++ b/src/cordova_b.js
@@ -226,4 +226,14 @@ var cordova = {
         });
     }
 };
+
+// FIXME hack: cordova iOS calls cordova.require()
+cordova.require = function(module) {
+  if(module === "cordova/exec") {
+    return cordova.exec;
+  }
+
+  return undefined;
+}
+
 window.cordova = module.exports = cordova;


Mime
View raw message