cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject js commit: [all] Move call to modulemapper into platform.js
Date Mon, 21 Jan 2013 17:10:40 GMT
Updated Branches:
  refs/heads/symbolmapping a81f5ba3a -> 3aa50363b


[all] Move call to modulemapper into platform.js

This allows it to be used by blackberry's two-phase symbol mapping.


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

Branch: refs/heads/symbolmapping
Commit: 3aa50363b2386a3bf3cd9285618224d7345ed112
Parents: a81f5ba
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Mon Jan 21 12:06:50 2013 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Mon Jan 21 12:09:34 2013 -0500

----------------------------------------------------------------------
 lib/android/platform.js                      |    6 +++-
 lib/bada/platform.js                         |    7 ++++-
 lib/blackberry/platform.js                   |    6 ++++
 lib/blackberry/plugin/air/file/bbsymbols.js  |   33 +++++++++++++++++++++
 lib/blackberry/plugin/air/platform.js        |   31 -------------------
 lib/blackberry/plugin/java/file/bbsymbols.js |   27 +++++++++++++++++
 lib/blackberry/plugin/java/platform.js       |   11 +------
 lib/ios/platform.js                          |    4 ++
 lib/scripts/bootstrap.js                     |    4 --
 lib/tizen/platform.js                        |    7 ++++-
 lib/webos/platform.js                        |    5 +++
 lib/windows8/platform.js                     |    4 ++
 lib/windowsphone/platform.js                 |    5 +++
 13 files changed, 102 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/android/platform.js
----------------------------------------------------------------------
diff --git a/lib/android/platform.js b/lib/android/platform.js
index 4f1da91..0231229 100644
--- a/lib/android/platform.js
+++ b/lib/android/platform.js
@@ -24,7 +24,11 @@ module.exports = {
     initialize:function() {
         var channel = require("cordova/channel"),
             cordova = require('cordova'),
-            exec = require('cordova/exec');
+            exec = require('cordova/exec'),
+            modulemapper = require('cordova/modulemapper');
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.mapModules(window);
 
         // Inject a listener for the backbutton on the document.
         var backButtonChannel = cordova.addDocumentEventHandler('backbutton');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/bada/platform.js
----------------------------------------------------------------------
diff --git a/lib/bada/platform.js b/lib/bada/platform.js
index 00620bf..1f96cfa 100644
--- a/lib/bada/platform.js
+++ b/lib/bada/platform.js
@@ -21,7 +21,12 @@
 
 module.exports = {
     id: "bada",
-    initialize: function() {},
+    initialize: function() {
+        var modulemapper = require('cordova/modulemapper');
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.mapModules(window);
+    },
     clobbers: {
         device: {
             path: 'cordova/plugin/bada/device'

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/blackberry/platform.js
----------------------------------------------------------------------
diff --git a/lib/blackberry/platform.js b/lib/blackberry/platform.js
index b508bc6..9eb9994 100644
--- a/lib/blackberry/platform.js
+++ b/lib/blackberry/platform.js
@@ -38,11 +38,17 @@ module.exports = {
     },
     initialize: function() {
         var builder = require('cordova/builder'),
+            modulemapper = require('cordova/modulemapper'),
             platform = require('cordova/plugin/' + this.runtime() + '/platform');
 
         builder.buildIntoButDoNotClobber(platform.defaults, window);
         builder.buildIntoAndClobber(platform.clobbers, window);
         builder.buildIntoAndMerge(platform.merges, window);
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.loadMatchingModules(new RegExp('cordova/.*' + this.runtime() + '/.*bbsymbols$'));
+        modulemapper.mapModules(window);
+
         platform.initialize();
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/blackberry/plugin/air/file/bbsymbols.js
----------------------------------------------------------------------
diff --git a/lib/blackberry/plugin/air/file/bbsymbols.js b/lib/blackberry/plugin/air/file/bbsymbols.js
new file mode 100644
index 0000000..26697fe
--- /dev/null
+++ b/lib/blackberry/plugin/air/file/bbsymbols.js
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+
+var modulemapper = require('cordova/modulemapper');
+
+modulemapper.clobbers('cordova/plugin/air/DirectoryReader', 'DirectoryReader');
+modulemapper.clobbers('cordova/plugin/air/File', 'File');
+modulemapper.clobbers('cordova/plugin/air/FileReader', 'FileReader');
+modulemapper.clobbers('cordova/plugin/air/FileWriter', 'FileWriter');
+modulemapper.clobbers('cordova/plugin/air/requestFileSystem', 'requestFileSystem');
+modulemapper.clobbers('cordova/plugin/air/resolveLocalFileSystemURI', 'resolveLocalFileSystemURI');
+modulemapper.merges('cordova/plugin/air/DirectoryEntry', 'DirectoryEntry');
+modulemapper.merges('cordova/plugin/air/Entry', 'Entry');
+modulemapper.merges('cordova/plugin/air/FileEntry', 'FileEntry');
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/blackberry/plugin/air/platform.js
----------------------------------------------------------------------
diff --git a/lib/blackberry/plugin/air/platform.js b/lib/blackberry/plugin/air/platform.js
index 762573a..85c7fd6 100644
--- a/lib/blackberry/plugin/air/platform.js
+++ b/lib/blackberry/plugin/air/platform.js
@@ -22,35 +22,4 @@
 module.exports = {
     id: "playbook",
     initialize:function() {},
-    clobbers: {
-        DirectoryReader:{
-            path: 'cordova/plugin/air/DirectoryReader'
-        },
-        File:{
-            path: 'cordova/plugin/air/File'
-        },
-        FileReader:{
-            path: 'cordova/plugin/air/FileReader'
-        },
-        FileWriter:{
-            path: 'cordova/plugin/air/FileWriter'
-        },
-        requestFileSystem:{
-            path: 'cordova/plugin/air/requestFileSystem'
-        },
-        resolveLocalFileSystemURI:{
-            path: 'cordova/plugin/air/resolveLocalFileSystemURI'
-        }
-    },
-    merges: {
-        DirectoryEntry: {
-            path: 'cordova/plugin/air/DirectoryEntry'
-        },
-        Entry: {
-            path: 'cordova/plugin/air/Entry'
-        },
-        FileEntry:{
-            path: 'cordova/plugin/air/FileEntry'
-        }
-    }
 };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/blackberry/plugin/java/file/bbsymbols.js
----------------------------------------------------------------------
diff --git a/lib/blackberry/plugin/java/file/bbsymbols.js b/lib/blackberry/plugin/java/file/bbsymbols.js
new file mode 100644
index 0000000..c37c952
--- /dev/null
+++ b/lib/blackberry/plugin/java/file/bbsymbols.js
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+
+var modulemapper = require('cordova/modulemapper');
+
+modulemapper.clobbers('cordova/plugin/File', 'File');
+modulemapper.merges('cordova/plugin/java/DirectoryEntry', 'DirectoryEntry');
+modulemapper.merges('cordova/plugin/java/Entry', 'Entry');
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/blackberry/plugin/java/platform.js
----------------------------------------------------------------------
diff --git a/lib/blackberry/plugin/java/platform.js b/lib/blackberry/plugin/java/platform.js
index 7b9a028..f7dc0e4 100644
--- a/lib/blackberry/plugin/java/platform.js
+++ b/lib/blackberry/plugin/java/platform.js
@@ -145,16 +145,13 @@ module.exports = {
         // Trap BlackBerry WebWorks exit. Allow plugins to clean up before exiting.
         blackberry.app.event.onExit(app.exitApp);
     },
-    objects: {
+    clobbers: {
         navigator: {
             children: {
                 app: {
                     path: "cordova/plugin/java/app"
                 }
             }
-        },
-        File: { // exists natively on BlackBerry OS 7, override
-            path: "cordova/plugin/File"
         }
     },
     merges: {
@@ -171,12 +168,6 @@ module.exports = {
         Contact: {
             path: 'cordova/plugin/java/Contact'
         },
-        DirectoryEntry: {
-            path: 'cordova/plugin/java/DirectoryEntry'
-        },
-        Entry: {
-            path: 'cordova/plugin/java/Entry'
-        },
         MediaError: { // Exists natively on BB OS 6+, merge in Cordova specifics
             path: 'cordova/plugin/java/MediaError'
         }

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/ios/platform.js
----------------------------------------------------------------------
diff --git a/lib/ios/platform.js b/lib/ios/platform.js
index 9470448..311aff3 100644
--- a/lib/ios/platform.js
+++ b/lib/ios/platform.js
@@ -22,6 +22,10 @@
 module.exports = {
     id: "ios",
     initialize:function() {
+        var modulemapper = require('cordova/modulemapper');
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.mapModules(window);
     },
     clobbers: {
         MediaError: { // exists natively, override

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/scripts/bootstrap.js
----------------------------------------------------------------------
diff --git a/lib/scripts/bootstrap.js b/lib/scripts/bootstrap.js
index 9fa92d8..62f3e69 100644
--- a/lib/scripts/bootstrap.js
+++ b/lib/scripts/bootstrap.js
@@ -37,7 +37,6 @@
                 channel.join(function() {
                     var builder = require('cordova/builder'),
                         base = require('cordova/common'),
-                        modulemapper = require('cordova/modulemapper'),
                         platform = require('cordova/platform');
 
                     // Drop the common globals into the window object, but be nice and don't
overwrite anything.
@@ -49,9 +48,6 @@
                     builder.buildIntoAndClobber(platform.clobbers, context);
                     builder.buildIntoAndMerge(platform.merges, context);
 
-                    modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
-                    modulemapper.mapModules(context);
-
                     // Call the platform-specific initialization
                     platform.initialize();
 

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/tizen/platform.js
----------------------------------------------------------------------
diff --git a/lib/tizen/platform.js b/lib/tizen/platform.js
index 48cd26a..dea2b9f 100644
--- a/lib/tizen/platform.js
+++ b/lib/tizen/platform.js
@@ -21,7 +21,12 @@
 
 module.exports = {
     id: "tizen",
-    initialize: function() {},
+    initialize: function() {
+        var modulemapper = require('cordova/modulemapper');
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.mapModules(window);
+    },
     clobbers: {
         device: {
             path: "cordova/plugin/tizen/Device"

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/webos/platform.js
----------------------------------------------------------------------
diff --git a/lib/webos/platform.js b/lib/webos/platform.js
index a42f95e..baa3457 100644
--- a/lib/webos/platform.js
+++ b/lib/webos/platform.js
@@ -25,6 +25,11 @@ var service=require('cordova/plugin/webos/service'),
 module.exports = {
     id: "webos",
     initialize: function() {
+        var modulemapper = require('cordova/modulemapper');
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.mapModules(window);
+
         if (window.PalmSystem) {
             window.PalmSystem.stageReady();
         }

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/windows8/platform.js
----------------------------------------------------------------------
diff --git a/lib/windows8/platform.js b/lib/windows8/platform.js
index 765a5c5..7646fea 100755
--- a/lib/windows8/platform.js
+++ b/lib/windows8/platform.js
@@ -45,6 +45,10 @@ require('cordova/plugin/windows8/NotificationProxy');
 module.exports = {
     id: "windows8",
     initialize:function() {
+        var modulemapper = require('cordova/modulemapper');
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.mapModules(window);
 
         window.alert = window.alert || require("cordova/plugin/notification").alert;
         window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
 

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3aa50363/lib/windowsphone/platform.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/platform.js b/lib/windowsphone/platform.js
index ee25843..aff1eec 100644
--- a/lib/windowsphone/platform.js
+++ b/lib/windowsphone/platform.js
@@ -34,6 +34,11 @@ require("cordova/plugin/windowsphone/XHRPatch");
 module.exports = {
     id: "windowsphone",
     initialize:function() {
+        var modulemapper = require('cordova/modulemapper');
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.mapModules(window);
+
         window.alert = window.alert || require("cordova/plugin/notification").alert;
         window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
 


Mime
View raw message