Fixed jshint warnings

This commit is contained in:
Marian Oancea 2014-11-10 14:53:35 +02:00
parent 6fc5d8e81e
commit d95e2b7999
5 changed files with 13 additions and 13 deletions

4
dist/ethereum.js vendored

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

View File

@ -36,7 +36,7 @@ gulp.task('clean', ['lint'], function(cb) {
del([ DEST ], cb); del([ DEST ], cb);
}); });
gulp.task('build', ['clean'], function () { gulp.task('prepare', ['clean'], function () {
return browserify({ return browserify({
debug: true, debug: true,
insert_global_vars: false, insert_global_vars: false,
@ -59,8 +59,8 @@ gulp.task('build', ['clean'], function () {
hoist_vars: true, hoist_vars: true,
negate_iife: false negate_iife: false
}, },
beautify: false, beautify: true,
warnings: true, warnings: true
}) })
.bundle() .bundle()
.pipe(exorcist(path.join( DEST, 'ethereum.js.map'))) .pipe(exorcist(path.join( DEST, 'ethereum.js.map')))
@ -68,7 +68,7 @@ gulp.task('build', ['clean'], function () {
.pipe(gulp.dest( DEST )); .pipe(gulp.dest( DEST ));
}); });
gulp.task('uglify', ['build'], function(){ gulp.task('build', ['prepare'], function(){
return gulp.src( DEST + 'ethereum.js') return gulp.src( DEST + 'ethereum.js')
.pipe(uglify()) .pipe(uglify())
.pipe(rename('ethereum.min.js')) .pipe(rename('ethereum.min.js'))
@ -76,7 +76,7 @@ gulp.task('uglify', ['build'], function(){
}); });
gulp.task('watch', function() { gulp.task('watch', function() {
gulp.watch(['./lib/*.js'], ['lint', 'build', 'uglify']); gulp.watch(['./lib/*.js'], ['lint', 'prepare', 'build']);
}); });
gulp.task('default', ['bower', 'lint', 'build', 'uglify']); gulp.task('default', ['bower', 'lint', 'prepare', 'build']);

View File

@ -223,7 +223,7 @@
// Find termination // Find termination
var str = ""; var str = "";
var i = 0, l = hex.length; var i = 0, l = hex.length;
if (hex.substring(0, 2) == '0x') if (hex.substring(0, 2) === '0x')
i = 2; i = 2;
for(; i < l; i+=2) { for(; i < l; i+=2) {
var code = hex.charCodeAt(i); var code = hex.charCodeAt(i);
@ -447,7 +447,7 @@
if(data._id) { if(data._id) {
var cb = web3._callbacks[data._id]; var cb = web3._callbacks[data._id];
if (cb) { if (cb) {
cb.call(this, data.error, data.data) cb.call(this, data.error, data.data);
delete web3._callbacks[data._id]; delete web3._callbacks[data._id];
} }
} }