From 69dbb24bcebec552d6f10a62df06191d7e85ae1e Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Wed, 12 Mar 2014 17:03:37 -0300 Subject: [PATCH] make util dependencies optional --- browser/build.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/browser/build.js b/browser/build.js index 3f6bc5a..4deae00 100644 --- a/browser/build.js +++ b/browser/build.js @@ -74,6 +74,10 @@ var modules = [ 'config', 'const', 'networks', + 'util/log', + 'util/util', + 'util/EncodedData', + 'util/VersionedData', ]; var opts = {}; @@ -85,19 +89,14 @@ opts.insertGlobals = true; var b = browserify(opts); b.require('browserify-bignum/bignumber.js', {expose: 'bignum'} ); b.require('browserify-buffertools/buffertools.js', {expose:'buffertools'}); +b.require('base58-native', {expose: 'base58-native'}); b.require('./bitcore', {expose: 'bitcore'}); -b.require('base58-native'); -b.require('./util/log'); -b.require('./util/util'); -b.require('./util/EncodedData'); -b.require('./util/VersionedData'); modules.forEach(function(m) { if (program.includeall || program.submodules.indexOf(m) > -1) { console.log('Including '+m+' in the browser bundle'); b.require('./' + m + '.js' , {expose: './'+m} ); } }); -b.require('soop'); if (!program.dontminify) { b.transform({