You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2014/04/24 23:11:20 UTC
[35/45] js commit: replacing init with init_b
replacing init with init_b
Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/16419e43
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/16419e43
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/16419e43
Branch: refs/heads/master
Commit: 16419e437d86b789fc378fd6d67fbec4b887edc1
Parents: 0990b5d
Author: Anis Kadri <an...@apache.org>
Authored: Wed Mar 5 16:20:22 2014 -0800
Committer: Anis Kadri <an...@apache.org>
Committed: Thu Mar 27 15:20:22 2014 +0100
----------------------------------------------------------------------
tasks/lib/require-tr.js | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/16419e43/tasks/lib/require-tr.js
----------------------------------------------------------------------
diff --git a/tasks/lib/require-tr.js b/tasks/lib/require-tr.js
index 2c347a3..7bde0f6 100644
--- a/tasks/lib/require-tr.js
+++ b/tasks/lib/require-tr.js
@@ -85,6 +85,10 @@ function _updateRequires(code) {
if(module === "cordova") {
node.args[0].value = path.join(root, "src", "cordova_b");
// android and amazon-fireos have some special require's
+ } else if(module.match(/cordova\/init/)) {
+ node.args[0].value = module.replace(/cordova\/init/,
+ path.join(root, "src", "common", "init_b"));
+ // require('cordova/exec') and require('cordova/platform') -> platform's exec/platform
} else if(module.match(/cordova\/(android|amazon-fireos)\/(.+)/)) {
node.args[0].value = module.replace(/cordova\/(android|amazon-fireos)\/(.+)/,
path.join(root, "src", "$1", "android", "$2"));