[Pkg-javascript-commits] [node-browser-pack] 86/141: hasExports

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:23:27 UTC 2017


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

rouca pushed a commit to branch master
in repository node-browser-pack.

commit e4ffe935e9f9f3d78e98f29509ce3b8e90ffa8f3
Author: James Halliday <mail at substack.net>
Date:   Thu Jul 24 01:32:53 2014 -0700

    hasExports
---
 index.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index a7d6f7b..0ff4b57 100644
--- a/index.js
+++ b/index.js
@@ -26,6 +26,7 @@ module.exports = function (opts) {
     );
     parser.pipe(through.obj(write, end));
     stream.standaloneModule = opts.standaloneModule;
+    stream.hasExports = opts.hasExports;
     
     var first = true;
     var entries = [];
@@ -42,9 +43,9 @@ module.exports = function (opts) {
             var pre = umd.prelude(opts.standalone).trim();
             stream.push(pre + 'return ');
         }
-        else if (first && opts.hasExports) {
+        else if (first && stream.hasExports) {
             var pre = opts.externalRequireName || 'require';
-            this.push(pre + '=');
+            stream.push(pre + '=');
         }
         if (first) stream.push(prelude + '({');
         

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



More information about the Pkg-javascript-commits mailing list