Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] use binary-pack module so we only need to npm install one extra…

… dependency for binary support
  • Loading branch information...
commit 712ba5c1234e4af1bc89a2ad385e1994621d9fe6 1 parent 71ced0b
@jcrugzz jcrugzz authored
Showing with 5 additions and 7 deletions.
  1. +1 −2  package.json
  2. +1 −1  parsers.json
  3. +3 −4 parsers/binary.js
View
3  package.json
@@ -42,7 +42,6 @@
"ws": "0.4.x",
"sockjs-client-node": "0.0.x",
"request": "2.21.x",
- "js-binarypack": "git://github.com/jcrugzz/js-binarypack.git#make-requireable",
- "binarypack": "0.0.x"
+ "binary-pack": "0.0.x"
}
}
View
2  parsers.json
@@ -7,6 +7,6 @@
"server": "e-json"
},
"binary": {
- "server": "binarypack js-binarypack"
+ "server": "binary-pack"
}
}
View
7 parsers/binary.js
@@ -1,7 +1,6 @@
'use strict';
-var BinaryPack = require('binarypack')
- , fs = require('fs');
+var BinaryPack = require('binary-pack');
/**
* Message encoder.
@@ -32,8 +31,8 @@ exports.decoder = function decoder(data, fn) {
//
exports.library = [
'var BinaryPack = (function () {',
- ' try { return require("binarypack"); }',
+ ' try { return require("binary-pack"); }',
' catch (e) {}',
- fs.readFileSync(require.resolve('js-binarypack'), 'utf-8'),
+ BinaryPack.BrowserSource,
'})();'
].join('\n');
Please sign in to comment.
Something went wrong with that request. Please try again.