You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/01/29 20:07:52 UTC

[28/37] js commit: [all] modulemapper refactor for exec.

[all] modulemapper refactor for exec.

This was the last entry in common.js.
https://issues.apache.org/jira/browse/CB-2227


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

Branch: refs/heads/symbolmapping
Commit: 37c8b213db4e710420198f2db1b94ae3fdc732b8
Parents: b1f2ffa
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Jan 25 15:19:28 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Jan 28 19:56:47 2013 -0500

----------------------------------------------------------------------
 lib/common/common.js     |   40 ----------------------------------------
 lib/common/symbols.js    |   27 +++++++++++++++++++++++++++
 lib/scripts/bootstrap.js |    6 ------
 3 files changed, 27 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/37c8b213/lib/common/common.js
----------------------------------------------------------------------
diff --git a/lib/common/common.js b/lib/common/common.js
deleted file mode 100644
index 7c167c1..0000000
--- a/lib/common/common.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * 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.
- *
-*/
-
-module.exports = {
-    defaults: {
-        cordova: {
-            path: 'cordova',
-            children: {
-                exec: {
-                    path: 'cordova/exec'
-                }
-            }
-        },
-        Cordova: {
-            children: {
-                exec: {
-                    path: 'cordova/exec'
-                }
-            }
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/37c8b213/lib/common/symbols.js
----------------------------------------------------------------------
diff --git a/lib/common/symbols.js b/lib/common/symbols.js
new file mode 100644
index 0000000..573b7e9
--- /dev/null
+++ b/lib/common/symbols.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');
+
+// Use merges here in case others symbols files depend on this running first,
+// but fail to declare the dependency with a require().
+modulemapper.merges('cordova', 'cordova');
+modulemapper.clobbers('cordova/exec', 'cordova.exec');
+modulemapper.clobbers('cordova/exec', 'Cordova.exec');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/37c8b213/lib/scripts/bootstrap.js
----------------------------------------------------------------------
diff --git a/lib/scripts/bootstrap.js b/lib/scripts/bootstrap.js
index 62f3e69..45c70aa 100644
--- a/lib/scripts/bootstrap.js
+++ b/lib/scripts/bootstrap.js
@@ -36,14 +36,8 @@
                  */
                 channel.join(function() {
                     var builder = require('cordova/builder'),
-                        base = require('cordova/common'),
                         platform = require('cordova/platform');
 
-                    // Drop the common globals into the window object, but be nice and don't overwrite anything.
-                    builder.buildIntoButDoNotClobber(base.defaults, context);
-                    builder.buildIntoAndClobber(base.clobbers, context);
-                    builder.buildIntoAndMerge(base.merges, context);
-
                     builder.buildIntoButDoNotClobber(platform.defaults, context);
                     builder.buildIntoAndClobber(platform.clobbers, context);
                     builder.buildIntoAndMerge(platform.merges, context);