mirror of https://github.com/status-im/web3.js.git
moved to BN.js
This commit is contained in:
parent
acf45217d3
commit
8503ac8884
|
@ -8,8 +8,7 @@
|
|||
"./dist/web3.min.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"bignumber.js": ">=2.0.0",
|
||||
"crypto-js": "~3.1.4"
|
||||
"bn.js": ">=4.11.6"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -61,8 +61,8 @@ gulp.task('clean', ['lint'], function(cb) {
|
|||
gulp.task('light', ['clean'], function () {
|
||||
return browserify(browserifyOptions)
|
||||
.require('./' + src + '.js', {expose: 'web3'})
|
||||
.ignore('bignumber.js')
|
||||
.require('./lib/utils/browser-bn.js', {expose: 'bignumber.js'}) // fake bignumber.js
|
||||
.ignore('bn.js')
|
||||
.require('./lib/utils/browser-bn.js', {expose: 'bn.js'}) // fake bn.js
|
||||
.add('./' + src + '.js')
|
||||
.bundle()
|
||||
.pipe(exorcist(path.join( DEST, lightDst + '.js.map')))
|
||||
|
@ -76,7 +76,7 @@ gulp.task('light', ['clean'], function () {
|
|||
gulp.task('standalone', ['clean'], function () {
|
||||
return browserify(browserifyOptions)
|
||||
.require('./' + src + '.js', {expose: 'web3'})
|
||||
.require('bignumber.js') // expose it to dapp users
|
||||
.require('bn.js') // expose it to dapp users
|
||||
.add('./' + src + '.js')
|
||||
.ignore('crypto')
|
||||
.bundle()
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
// Browser environment
|
||||
if(typeof window !== 'undefined') {
|
||||
Web3 = (typeof window.Web3 !== 'undefined') ? window.Web3 : require('web3');
|
||||
BigNumber = (typeof window.BigNumber !== 'undefined') ? window.BigNumber : require('bignumber.js');
|
||||
BigNumber = (typeof window.BigNumber !== 'undefined') ? window.BigNumber : require('bn.js');
|
||||
}
|
||||
|
||||
|
||||
// Node environment
|
||||
if(typeof global !== 'undefined') {
|
||||
Web3 = (typeof global.Web3 !== 'undefined') ? global.Web3 : require('web3');
|
||||
BigNumber = (typeof global.BigNumber !== 'undefined') ? global.BigNumber : require('bignumber.js');
|
||||
BigNumber = (typeof global.BigNumber !== 'undefined') ? global.BigNumber : require('bn.js');
|
||||
}
|
||||
|
||||
/* jshint ignore:end */
|
Loading…
Reference in New Issue