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).
This commit is contained in:
Ryan X. Charles 2014-07-14 20:53:22 -07:00
parent e75267bd01
commit fc942c2ac5

View File

@ -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) {