cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [3/7] js commit: Fixed browserify onDeviceReady event not firing on the browser
Date Tue, 26 Aug 2014 18:07:46 GMT
Fixed browserify onDeviceReady event not firing on the browser


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

Branch: refs/heads/master
Commit: feb58c41daba2d59caa7adbf4178b24a763472b1
Parents: bf4c4db
Author: Suraj Pindoria <suraj.pindoria@yahoo.com>
Authored: Thu Aug 21 17:08:20 2014 -0700
Committer: Suraj Pindoria <suraj.pindoria@yahoo.com>
Committed: Thu Aug 21 17:08:20 2014 -0700

----------------------------------------------------------------------
 src/browser/platform.js | 4 +---
 tasks/lib/require-tr.js | 6 ++++++
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/feb58c41/src/browser/platform.js
----------------------------------------------------------------------
diff --git a/src/browser/platform.js b/src/browser/platform.js
index 8015cef..b8f7ac3 100644
--- a/src/browser/platform.js
+++ b/src/browser/platform.js
@@ -30,9 +30,7 @@ module.exports = {
 
         moduleMapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy');
 
-        channel.onPluginsReady.subscribe(function () {
-            channel.onNativeReady.fire();
-        });
+        channel.onNativeReady.fire();
 
         // FIXME is this the right place to clobber pause/resume? I am guessing not
         // FIXME pause/resume should be deprecated IN CORDOVA for pagevisiblity api

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/feb58c41/tasks/lib/require-tr.js
----------------------------------------------------------------------
diff --git a/tasks/lib/require-tr.js b/tasks/lib/require-tr.js
index 6c61b1a..7669993 100644
--- a/tasks/lib/require-tr.js
+++ b/tasks/lib/require-tr.js
@@ -43,6 +43,10 @@ var requireTr = {
     }
 
     function end() {
+      if(file.match(/browser\/platform.js$/) || file.match(/browser\\platform.js$/)) {
+        data = data.replace(/moduleMapper\.clobbers.*\n/,
+                            util.format('cordova.commandProxy = require("%s/src/common/exec/proxy")',
root));
+      }
         // SOME BS pre-transforms
       if(file.match(/android\/platform.js$/) || file.match(/android\\platform.js$/)) {
 
@@ -91,6 +95,8 @@ function _updateRequires(code) {
 
         // Uglify is not able to recognize Windows style paths using '\' instead of '/'
         // So replacing all of the '/' back to Windows '\'
+
+        // FIXME: need to better handle cases of modulemapper replace
         if (node.args[0].value !== undefined && node.args[0].value.indexOf('/android/app')
!== -1 && process.platform === 'win32') {
             node.args[0].value = node.args[0].value.replace(/\//g, '\\');
         }


Mime
View raw message