Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
'use strict';

var gulp = require('gulp');
var closureCompiler = require('gulp-closure-compiler');
var coveralls = require('gulp-coveralls');
var jshint = require('gulp-jshint');
var mocha = require('gulp-mocha');
Expand Down Expand Up @@ -91,18 +90,9 @@ gulp.task('browser:uncompressed', ['browser:makefolder', 'errors'], shell.task([
'./node_modules/.bin/browserify index.js --insert-global-vars=true --standalone=bitcore -o browser/bitcore.js'
]));

gulp.task('browser:compressed', ['browser:makefolder', 'errors'], function() {
return gulp.src('dist/bitcore.js')
.pipe(closureCompiler({
fileName: 'bitcore.min.js',
compilerPath: 'node_modules/closure-compiler-jar/compiler.jar',
compilerFlags: {
language_in: 'ECMASCRIPT5',
jscomp_off: 'suspiciousCode'
}
}))
.pipe(gulp.dest('dist'));
});
gulp.task('browser:compressed', ['browser:uncompressed'], shell.task([
'./node_modules/.bin/uglifyjs dist/bitcore.js --compress --mangle -o dist/bitcore.min.js'
]));

gulp.task('browser:maketests', ['browser:makefolder'], shell.task([
'find test/ -type f -name "*.js" | xargs ./node_modules/.bin/browserify -t brfs -o browser/tests.js'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"brfs": "1.2.0",
"browserify": "~6.3.3",
"chai": "~1.10.0",
"closure-compiler-jar": "git://github.com/eordano/closure-compiler-jar.git",
"gulp": "^3.8.10",
"gulp-closure-compiler": "^0.2.9",
"gulp-coveralls": "^0.1.3",
Expand All @@ -107,7 +106,8 @@
"plato": "^1.3.0",
"run-sequence": "^1.0.2",
"sinon": "^1.12.2",
"through2": "=0.6.3"
"through2": "=0.6.3",
"uglify-js": "=2.4.16"
},
"license": "MIT"
}