From fc942c2ac56e08928d97fd978f8593af453b0f6a Mon Sep 17 00:00:00 2001 From: "Ryan X. Charles" Date: Mon, 14 Jul 2014 20:53:22 -0700 Subject: [PATCH] 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). --- browser/build.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/browser/build.js b/browser/build.js index 5c8fb63..a34aae6 100644 --- a/browser/build.js +++ b/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) {