[Pkg-javascript-commits] [sockjs-client] 207/350: Override process to be an empty obj

tonnerre at ancient-solutions.com tonnerre at ancient-solutions.com
Fri Aug 5 01:04:22 UTC 2016


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

tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.

commit 264de129e7965154b9def8988c7096ba11e5c36a
Author: Bryce Kahle <bkahle at gmail.com>
Date:   Mon Oct 20 19:04:20 2014 -0400

    Override process to be an empty obj
---
 gulpfile.js | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/gulpfile.js b/gulpfile.js
index 3e2413b..e695157 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1,6 +1,7 @@
 'use strict';
 
-var gulp = require('gulp')
+var util = require('util')
+  , gulp = require('gulp')
   , browserify = require('browserify')
   , uglify = require('gulp-uglify')
   , sourcemaps = require('gulp-sourcemaps')
@@ -14,6 +15,16 @@ var gulp = require('gulp')
   ;
 
 var libName = 'sockjs-' + pkg.version
+  , browserifyOptions = {
+      entries: './lib/entry.js'
+    , standalone: 'SockJS'
+    , fullPaths: true
+    , insertGlobalVars: {
+        process: function () {
+          return '{ env: {} }';
+        }
+      }
+    }
   ;
 
 gulp.task('test', function () {
@@ -38,11 +49,9 @@ gulp.task('testbundle', ['browserify:min'], function() {
 });
 
 gulp.task('browserify', function () {
-  return browserify({
-      entries: './lib/entry.js'
-    , standalone: 'SockJS'
-    , debug: true
-    })
+  return browserify(util._extend({
+      debug: true
+    }, browserifyOptions))
     .ignore('querystring')
     .bundle()
     .pipe(source('sockjs.js'))
@@ -54,10 +63,7 @@ gulp.task('browserify', function () {
 });
 
 gulp.task('browserify:min', function () {
-  return browserify({
-      entries: './lib/entry.js'
-    , standalone: 'SockJS'
-    })
+  return browserify(browserifyOptions)
     .ignore('querystring')
     .exclude('debug')
     .transform(envify({

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



More information about the Pkg-javascript-commits mailing list