[Pkg-javascript-commits] [node-async] 372/480: Changed the order of exporting async by module-type first, because if using browserify to build an app it will conflict with existing apps usigin requireJS and it does not matter for the requireJS use case if before testing for existence of module.exports

Jonas Smedegaard js at moszumanska.debian.org
Fri May 2 08:58:43 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository node-async.

commit db06259ab373e669059ae126c4403cf0e6f9af52
Author: Mike Lohmann <mike.lohmann at icans-gmbh.com>
Date:   Tue Dec 3 15:08:37 2013 +0100

    Changed the order of exporting async by module-type first, because if using browserify to build an app it will conflict with existing apps usigin requireJS and it does not matter for the requireJS use case if before testing for existence of module.exports
---
 lib/async.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/async.js b/lib/async.js
index cb6320d..1e0d128 100755
--- a/lib/async.js
+++ b/lib/async.js
@@ -937,16 +937,16 @@
         next();
     };
 
+    // Node.js
+    if (typeof module !== 'undefined' && module.exports) {
+        module.exports = async;
+    }
     // AMD / RequireJS
-    if (typeof define !== 'undefined' && define.amd) {
+    else if (typeof define !== 'undefined' && define.amd) {
         define([], function () {
             return async;
         });
     }
-    // Node.js
-    else if (typeof module !== 'undefined' && module.exports) {
-        module.exports = async;
-    }
     // included directly via <script> tag
     else {
         root.async = async;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git



More information about the Pkg-javascript-commits mailing list