[Pkg-javascript-commits] [sockjs-client] 114/350: Fix browserify

tonnerre at ancient-solutions.com tonnerre at ancient-solutions.com
Fri Aug 5 01:03:49 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 2e961f4d551190a3b1b6af64ba8a6d115906906e
Author: Bryce Kahle <bkahle at gmail.com>
Date:   Fri Oct 10 15:01:30 2014 -0400

    Fix browserify
---
 gulpfile.js                                  | 9 ++++++---
 lib/facade.js                                | 2 +-
 lib/info-receiver.js                         | 4 ++--
 lib/transport/browser/abstract-xhr.js        | 2 +-
 lib/transport/facade/info-receiver-iframe.js | 1 +
 lib/transport/lib/frames.js                  | 2 +-
 lib/transport/xdr-streaming.js               | 4 ++--
 lib/utils/escape.js                          | 2 +-
 8 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/gulpfile.js b/gulpfile.js
index 3ccaa6c..844f8b3 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -31,7 +31,8 @@ gulp.task('watch', function () {
 });
 
 gulp.task('testbundle', function() {
-  browserify('./lib/sockjs.js')
+  browserify('./lib/entry.js')
+    .ignore('querystring')
     .bundle({
       standalone: 'SockJS'
     , debug: true
@@ -50,7 +51,8 @@ gulp.task('testbundle', function() {
 });
 
 gulp.task('browserify', function () {
-  return browserify('./lib/sockjs.js')
+  return browserify('./lib/entry.js', { fullPaths: true })
+    .ignore('querystring')
     .bundle({
       standalone: 'SockJS'
     , debug: true
@@ -63,7 +65,8 @@ gulp.task('browserify', function () {
 });
 
 gulp.task('browserify:min', function () {
-  return browserify('./lib/sockjs.js')
+  return browserify('./lib/entry.js', { fullPaths: true })
+    .ignore('querystring')
     .plugin('minifyify', {
       map: libName + '.min.js.map'
     , compressPath: jsRoot
diff --git a/lib/facade.js b/lib/facade.js
index c7494d5..44b3192 100644
--- a/lib/facade.js
+++ b/lib/facade.js
@@ -1,6 +1,6 @@
 'use strict';
 
-var frameDefs = require('./lib/frames')
+var frameDefs = require('./transport/lib/frames')
   , iframeUtils = require('./transport/lib/iframe-utils')
   ;
 
diff --git a/lib/info-receiver.js b/lib/info-receiver.js
index 6a48fb1..9a569e7 100644
--- a/lib/info-receiver.js
+++ b/lib/info-receiver.js
@@ -2,7 +2,7 @@
 
 var EventEmitter = require('events').EventEmitter
   , util = require('util')
-  , utils = require('./utils/origin')
+  , origin = require('./utils/origin')
   , JSON3 = require('json3')
   , loc = require('./polyfills/location')
   , XHRCors = require('./transport/sender/xhr-cors')
@@ -21,7 +21,7 @@ function InfoReceiver(baseUrl) {
 
   var AjaxObject = XHRFake;
   // determine method of CORS support (if needed)
-  if (utils.isSameOriginUrl(baseUrl, loc.href)) {
+  if (origin.isSameOriginUrl(baseUrl, loc.href)) {
     AjaxObject = XHRLocal;
   } else if (XHRCors.enabled) {
     AjaxObject = XHRCors;
diff --git a/lib/transport/browser/abstract-xhr.js b/lib/transport/browser/abstract-xhr.js
index 066b01e..9091c6c 100644
--- a/lib/transport/browser/abstract-xhr.js
+++ b/lib/transport/browser/abstract-xhr.js
@@ -2,7 +2,7 @@
 
 var EventEmitter = require('events').EventEmitter
   , util = require('util')
-  , utils = require('../../utils')
+  , utils = require('../../utils/event')
   ;
 
 function AbstractXHRObject(method, url, payload, opts) {
diff --git a/lib/transport/facade/info-receiver-iframe.js b/lib/transport/facade/info-receiver-iframe.js
index ee59524..864f798 100644
--- a/lib/transport/facade/info-receiver-iframe.js
+++ b/lib/transport/facade/info-receiver-iframe.js
@@ -10,6 +10,7 @@ var XHRLocalObject = require('../sender/xhr-local')
   ;
 
 function WInfoReceiverIframe(transUrl, baseUrl) {
+  var self = this;
   EventTarget.call(this);
 
   var ir = new InfoReceiver(baseUrl, XHRLocalObject);
diff --git a/lib/transport/lib/frames.js b/lib/transport/lib/frames.js
index c0bbd90..52da06a 100644
--- a/lib/transport/lib/frames.js
+++ b/lib/transport/lib/frames.js
@@ -1,6 +1,6 @@
 'use strict';
 
-var JSON3 = require('JSON3');
+var JSON3 = require('json3');
 
 module.exports = {
   close: function (code, reason) {
diff --git a/lib/transport/xdr-streaming.js b/lib/transport/xdr-streaming.js
index 8c42d82..ee5c491 100644
--- a/lib/transport/xdr-streaming.js
+++ b/lib/transport/xdr-streaming.js
@@ -4,7 +4,7 @@ var util = require('util')
   , AjaxBasedTransport = require('./lib/ajax-based')
   , XhrReceiver = require('./receiver/xhr')
   , XDRObject = require('./sender/xdr')
-  , utils = require('../utils/origin')
+  , origin = require('../utils/origin')
   , loc = require('../polyfills/location')
   ;
 
@@ -24,7 +24,7 @@ XdrStreamingTransport.enabled = function(url, info) {
   }
   // IE 8/9 if the request target uses the same scheme - #79
   return !!(global.XDomainRequest && global.document &&
-    global.document.domain && utils.isSameOriginScheme(url, loc.href));
+    global.document.domain && origin.isSameOriginScheme(url, loc.href));
 };
 
 XdrStreamingTransport.transportName = 'xdr-streaming';
diff --git a/lib/utils/escape.js b/lib/utils/escape.js
index 1ecc8b6..857d274 100644
--- a/lib/utils/escape.js
+++ b/lib/utils/escape.js
@@ -1,6 +1,6 @@
 'use strict';
 
-var JSON3 = require('JSON3');
+var JSON3 = require('json3');
 
 // Some extra characters that Chrome gets wrong, and substitutes with
 // something else on the wire.

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