Browse Source

remove network stuff from main build

The network classes Connection, Peer and PeerManager are not useful from the
browser, so I have removed them from the main browser bundle by default.  This
saves several tens of kilobytes from the browser bundle (since not only are
these files not included, but their dependencies are not included either).
patch-2
Ryan X. Charles 10 years ago
parent
commit
fc942c2ac5
  1. 5
      browser/build.js

5
browser/build.js

@ -76,8 +76,11 @@ var createBitcore = function(opts) {
submodules.splice(submodules.indexOf('lib/BIP39'), 1);
submodules.splice(submodules.indexOf('lib/BIP39WordlistEn'), 1);
submodules.splice(submodules.indexOf('lib/PayPro'), 1);
submodules.splice(submodules.indexOf('lib/Connection'), 1);
submodules.splice(submodules.indexOf('lib/Peer'), 1);
submodules.splice(submodules.indexOf('lib/PeerManager'), 1);
var assert = require('assert');
assert(submodules.length == modules.length - 3);
assert(submodules.length == modules.length - 6);
}
if (opts.submodules) {

Loading…
Cancel
Save