diff --git a/browser/build.js b/browser/build.js index b427f5a..a43f954 100644 --- a/browser/build.js +++ b/browser/build.js @@ -181,7 +181,10 @@ if (require.main === module) { testBundle.pipe(fs.createWriteStream('browser/testdata.js')); } var bitcoreBundle = createBitcore(program); - bitcoreBundle.pipe(program.stdout ? process.stdout : fs.createWriteStream('browser/bundle.js')); + var pjson = require('../package.json'); + bitcoreBundle.pipe( + program.stdout ? process.stdout : + fs.createWriteStream('browser/bitcore-'+pjson.version+'.js')); } module.exports.createBitcore = createBitcore; diff --git a/browser/testdata.js b/browser/testdata.js index 6b153ce..5922dfd 100644 --- a/browser/testdata.js +++ b/browser/testdata.js @@ -1174,6 +1174,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; ? Uint8Array : Array + var ZERO = '0'.charCodeAt(0) var PLUS = '+'.charCodeAt(0) var SLASH = '/'.charCodeAt(0) var NUMBER = '0'.charCodeAt(0) @@ -1282,9 +1283,9 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; return output } - exports.toByteArray = b64ToByteArray - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + module.exports.toByteArray = b64ToByteArray + module.exports.fromByteArray = uint8ToBase64 +}()) },{}],4:[function(require,module,exports){ exports.read = function(buffer, offset, isLE, mLen, nBytes) {