Browse Source

Merge commit '7963e26aeb39d4ecb24edf1b206b2ef0757a0c70' into ethereumjs_subtree

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
10873397d7
  1. 1180
      libjsqrc/ethereumjs/dist/ethereum.js
  2. 18
      libjsqrc/ethereumjs/dist/ethereum.js.map
  3. 2
      libjsqrc/ethereumjs/dist/ethereum.min.js
  4. 81
      libjsqrc/ethereumjs/gulpfile.js

1180
libjsqrc/ethereumjs/dist/ethereum.js

File diff suppressed because one or more lines are too long

18
libjsqrc/ethereumjs/dist/ethereum.js.map

File diff suppressed because one or more lines are too long

2
libjsqrc/ethereumjs/dist/ethereum.min.js

File diff suppressed because one or more lines are too long

81
libjsqrc/ethereumjs/gulpfile.js

@ -18,8 +18,8 @@ var bower = require('bower');
var DEST = './dist/';
var build = function(src, dst) {
return browserify({
var build = function(src, dst, ugly) {
var result = browserify({
debug: true,
insert_global_vars: false,
detectGlobals: false,
@ -30,40 +30,25 @@ var build = function(src, dst) {
.transform('envify', {
NODE_ENV: 'build'
})
.transform('unreachable-branch-transform')
.transform('uglifyify', {
mangle: false,
compress: {
dead_code: false,
conditionals: true,
unused: false,
hoist_funs: true,
hoist_vars: true,
negate_iife: false
},
beautify: true,
warnings: true
})
.bundle()
.pipe(exorcist(path.join( DEST, dst + '.js.map')))
.pipe(source(dst + '.js'))
.pipe(gulp.dest( DEST ));
};
var buildDev = function(src, dst) {
return browserify({
debug: true,
insert_global_vars: false,
detectGlobals: false,
bundleExternal: false
})
.require('./' + src + '.js', {expose: 'web3'})
.add('./' + src + '.js')
.transform('envify', {
NODE_ENV: 'build'
})
.transform('unreachable-branch-transform')
.bundle()
.transform('unreachable-branch-transform');
if (ugly) {
result = result.transform('uglifyify', {
mangle: false,
compress: {
dead_code: false,
conditionals: true,
unused: false,
hoist_funs: true,
hoist_vars: true,
negate_iife: false
},
beautify: true,
warnings: true
});
}
return result.bundle()
.pipe(exorcist(path.join( DEST, dst + '.js.map')))
.pipe(source(dst + '.js'))
.pipe(gulp.dest( DEST ));
@ -83,33 +68,29 @@ gulp.task('bower', function(cb){
});
});
gulp.task('clean', ['lint'], function(cb) {
del([ DEST ], cb);
});
gulp.task('lint', function(){
return gulp.src(['./*.js', './lib/*.js'])
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('clean', ['lint'], function(cb) {
del([ DEST ], cb);
});
gulp.task('build', ['clean'], function () {
return build('index', 'ethereum');
});
gulp.task('buildQt', ['clean'], function () {
return build('index_qt', 'ethereum');
return build('index', 'ethereum', true);
});
gulp.task('buildDev', ['clean'], function () {
return buildDev('index', 'ethereum');
return build('index', 'ethereum', false);
});
gulp.task('uglify', ['build'], function(){
return uglifyFile('ethereum');
});
gulp.task('uglifyQt', ['buildQt'], function () {
gulp.task('uglify', ['buildDev'], function(){
return uglifyFile('ethereum');
});
@ -117,7 +98,7 @@ gulp.task('watch', function() {
gulp.watch(['./lib/*.js'], ['lint', 'prepare', 'build']);
});
gulp.task('default', ['bower', 'lint', 'build', 'uglify']);
gulp.task('qt', ['bower', 'lint', 'buildQt', 'uglifyQt']);
gulp.task('dev', ['bower', 'lint', 'buildDev']);
gulp.task('release', ['bower', 'lint', 'build', 'uglify']);
gulp.task('dev', ['bower', 'lint', 'buildDev', 'uglify']);
gulp.task('default', ['dev']);

Loading…
Cancel
Save