Skip to content

Commit

Permalink
Merge pull request #9 from aionnetwork/browser-dist
Browse files Browse the repository at this point in the history
remove light build + fix browser build
  • Loading branch information
ali-sharif authored Apr 28, 2018
2 parents 9f68b29 + 66fdad4 commit 8e59810
Show file tree
Hide file tree
Showing 9 changed files with 4,046 additions and 17,744 deletions.
12,769 changes: 0 additions & 12,769 deletions dist/web3-light.js

This file was deleted.

175 changes: 0 additions & 175 deletions dist/web3-light.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/web3-light.min.js

This file was deleted.

4,813 changes: 2,425 additions & 2,388 deletions dist/web3.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions dist/web3.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/web3.min.js

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var replace = require('gulp-replace');
var source = require('vinyl-source-stream');
var exorcist = require('exorcist');
var streamify = require('gulp-streamify');
var envify = require('envify/custom');

var DEST = path.join(__dirname, 'dist/');
var src = 'index';
Expand Down Expand Up @@ -42,12 +43,17 @@ gulp.task('clean', ['lint'], function(cb){
del([ DEST ]).then(cb.bind(null, null));
});

/*
gulp.task('browser', ['clean'], function () {
return browserify(browserifyOptions)
.require('./' + src + '.js', {expose: 'web3'})
.ignore('bignumber.js')
.require('./lib/utils/browser-bn.js', {expose: 'bignumber.js'})
.add('./' + src + '.js')
.transform(envify({
NODE_ENV: 'development',
debug: false
}))
.bundle()
.pipe(exorcist(path.join( DEST, lightDst + '.js.map')))
.pipe(source(lightDst + '.js'))
Expand All @@ -56,13 +62,18 @@ gulp.task('browser', ['clean'], function () {
.pipe(rename(lightDst + '.min.js'))
.pipe(gulp.dest( DEST ));
});
*/

gulp.task('node', ['clean'], function () {
return browserify(browserifyOptions)
.require('./' + src + '.js', {expose: 'web3'})
.require('bignumber.js')
.add('./' + src + '.js')
.ignore('crypto')
.transform(envify({
NODE_ENV: 'development',
debug: false
}))
.bundle()
.pipe(exorcist(path.join( DEST, dst + '.js.map')))
.pipe(source(dst + '.js'))
Expand All @@ -72,7 +83,7 @@ gulp.task('node', ['clean'], function () {
.pipe(gulp.dest( DEST ));
});

gulp.task('build', ['lint', 'clean', 'version', 'browser', 'node']);
gulp.task('build', ['lint', 'clean', 'version', 'node']);

gulp.task('watch', function() {
gulp.watch(['./lib/*.js'], ['lint', 'build']);
Expand Down
Loading

0 comments on commit 8e59810

Please sign in to comment.