mirror of https://github.com/status-im/web3.js.git
light browser bundle
This commit is contained in:
parent
4b371372b7
commit
c7e5d0a9fe
|
@ -540,7 +540,7 @@ module.exports = {
|
|||
},{"./formatters":2}],4:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
exports.XMLHttpRequest = window.XMLHttpRequest;
|
||||
exports.XMLHttpRequest = XMLHttpRequest;
|
||||
|
||||
},{}],5:[function(require,module,exports){
|
||||
/*
|
||||
|
@ -2844,7 +2844,7 @@ module.exports = {
|
|||
},{}],"bignumber.js":[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
module.exports = window.BigNumber;
|
||||
module.exports = BigNumber;
|
||||
|
||||
|
||||
},{}],"ethereum.js":[function(require,module,exports){
|
||||
|
@ -2859,4 +2859,4 @@ module.exports = web3;
|
|||
},{"./lib/solidity/abi":1,"./lib/web3":8,"./lib/web3/contract":9,"./lib/web3/httpprovider":15,"./lib/web3/qtsync":18}]},{},["ethereum.js"])
|
||||
|
||||
|
||||
//# sourceMappingURL=ethereum.js.map
|
||||
//# sourceMappingURL=ethereum-light.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -540,7 +540,7 @@ module.exports = {
|
|||
},{"./formatters":2}],4:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
exports.XMLHttpRequest = window.XMLHttpRequest;
|
||||
exports.XMLHttpRequest = XMLHttpRequest;
|
||||
|
||||
},{}],5:[function(require,module,exports){
|
||||
/*
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@
|
|||
|
||||
<head>
|
||||
<script type="text/javascript" src="js/bignumber.js/bignumber.min.js"></script>
|
||||
<script type="text/javascript" src="../dist/light/ethereum.js"></script>
|
||||
<script type="text/javascript" src="../dist/ethereum-light.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var web3 = require('ethereum.js');
|
||||
|
|
18
gulpfile.js
18
gulpfile.js
|
@ -18,9 +18,9 @@ var streamify = require('gulp-streamify');
|
|||
var replace = require('gulp-replace');
|
||||
|
||||
var DEST = './dist/';
|
||||
var DEST2 = './dist/light/'; // jshint ignore:line
|
||||
var src = 'index';
|
||||
var dst = 'ethereum';
|
||||
var lightDst = 'ethereum-light';
|
||||
|
||||
var browserifyOptions = {
|
||||
debug: true,
|
||||
|
@ -55,19 +55,19 @@ gulp.task('lint', function(){
|
|||
.pipe(jshint.reporter('default'));
|
||||
});
|
||||
|
||||
gulp.task('buildNormal', ['clean'], function () {
|
||||
gulp.task('buildLight', ['clean'], function () {
|
||||
return browserify(browserifyOptions)
|
||||
.require('./' + src + '.js', {expose: 'ethereum.js'})
|
||||
.ignore('bignumber.js')
|
||||
.require('./lib/utils/browser-bn.js', {expose: 'bignumber.js'}) // fake bignumber.js
|
||||
.add('./' + src + '.js')
|
||||
.bundle()
|
||||
.pipe(exorcist(path.join( DEST2, dst + '.js.map')))
|
||||
.pipe(source(dst + '.js'))
|
||||
.pipe(gulp.dest( DEST2 ))
|
||||
.pipe(exorcist(path.join( DEST, lightDst + '.js.map')))
|
||||
.pipe(source(lightDst + '.js'))
|
||||
.pipe(gulp.dest( DEST ))
|
||||
.pipe(streamify(uglify()))
|
||||
.pipe(rename(dst + '.min.js'))
|
||||
.pipe(gulp.dest( DEST2 ));
|
||||
.pipe(rename(lightDst + '.min.js'))
|
||||
.pipe(gulp.dest( DEST ));
|
||||
});
|
||||
|
||||
gulp.task('buildStandalone', ['clean'], function () {
|
||||
|
@ -89,9 +89,9 @@ gulp.task('watch', function() {
|
|||
gulp.watch(['./lib/*.js'], ['lint', 'build']);
|
||||
});
|
||||
|
||||
gulp.task('normal', ['versionReplace','bower', 'lint', 'buildNormal']);
|
||||
gulp.task('light', ['versionReplace','bower', 'lint', 'buildLight']);
|
||||
gulp.task('standalone', ['versionReplace','bower', 'lint', 'buildStandalone']);
|
||||
gulp.task('default', ['normal', 'standalone']);
|
||||
gulp.task('default', ['light', 'standalone']);
|
||||
|
||||
|
||||
gulp.task('version', ['versionReplace']);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = window.BigNumber;
|
||||
module.exports = BigNumber;
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
'use strict';
|
||||
|
||||
exports.XMLHttpRequest = window.XMLHttpRequest;
|
||||
exports.XMLHttpRequest = XMLHttpRequest;
|
||||
|
|
Loading…
Reference in New Issue