cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cordova-lib git commit: CB-8158 added hasModule check to browserify code
Date Thu, 18 Dec 2014 08:49:37 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master 0f10ec4a0 -> 1e767556c


CB-8158 added hasModule check to browserify code


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

Branch: refs/heads/master
Commit: 1e767556cb6934243199ad0d2b923fa00f9ceb55
Parents: 0f10ec4
Author: Steve Gill <stevengill97@gmail.com>
Authored: Thu Dec 18 00:49:30 2014 -0800
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Thu Dec 18 00:49:30 2014 -0800

----------------------------------------------------------------------
 cordova-lib/src/plugman/prepare-browserify.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/1e767556/cordova-lib/src/plugman/prepare-browserify.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/prepare-browserify.js b/cordova-lib/src/plugman/prepare-browserify.js
index 1d855ce..725b529 100644
--- a/cordova-lib/src/plugman/prepare-browserify.js
+++ b/cordova-lib/src/plugman/prepare-browserify.js
@@ -193,7 +193,10 @@ module.exports = function handlePrepare(project_dir, platform, plugins_dir,
www_
 
                         var fsPath = path.join.apply(path, pathParts);
                         var scriptPath = path.join(pluginDir, fsPath);
-                        requireTr.addModule({symbol: moduleName, path: scriptPath});
+                        
+                        if(requireTr.hasModule(moduleName) === false) {
+                            requireTr.addModule({symbol: moduleName, path: scriptPath});
+                        }
 
                         module.getchildren().forEach(function(child) {
                             if (child.tag.toLowerCase() == 'clobbers') {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message