[Pkg-javascript-commits] [node-browser-pack] 46/141: allow an injectable prelude

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:23:23 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 4fe173b66858f8a0e4a4ced9191de05cc47e72c7
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Mon May 6 22:42:29 2013 +0100

    allow an injectable prelude
---
 index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index 0740650..5625b10 100644
--- a/index.js
+++ b/index.js
@@ -10,7 +10,7 @@ var combineSourceMap = require('combine-source-map');
 
 var prelude = (function () {
     var src = fs.readFileSync(path.join(__dirname, 'prelude.js'), 'utf8');
-    return uglify(src) + '({';
+    return uglify(src);
 })();
 
 function newlinesIn(src) {
@@ -36,7 +36,7 @@ module.exports = function (opts) {
     return duplexer(parser, output);
     
     function write (row) {
-        if (first) this.queue(prelude);
+        if (first) this.queue((opts.prelude || prelude) + '({');
         
         if (row.sourceFile) { 
             sourcemap = sourcemap || combineSourceMap.create();

-- 
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