From 69026973834e6fb7b4353df06e958e526d16c954 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Thu, 4 Dec 2014 23:30:32 -0500 Subject: [PATCH 1/4] Tests: Speed up browser build --- gulpfile.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index aa98843..d80d789 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -11,12 +11,10 @@ 'use strict'; var gulp = require('gulp'); -var browserify = require('gulp-browserify'); var closureCompiler = require('gulp-closure-compiler'); var jsdoc = require('gulp-jsdoc'); var jshint = require('gulp-jshint'); var mocha = require('gulp-mocha'); -var rename = require('gulp-rename'); var runSequence = require('run-sequence'); var shell = require('gulp-shell'); @@ -93,18 +91,12 @@ gulp.task('lint', function() { .pipe(jshint.reporter('default')); }); -gulp.task('browser', ['errors'], function() { - return gulp.src('index.js') - .pipe(browserify({ - insertGlobals: true, - standalone: 'bitcore' - })) - .pipe(rename('bitcore.js')) - .pipe(gulp.dest('browser')); -}); +gulp.task('browser', ['errors'], shell.task([ + './node_modules/.bin/browserify index.js --insert-global-vars=true --standalone=bitcore -o ./browser/bitcore.js' +])); gulp.task('browser-test', shell.task([ - 'find test/ -type f -name "*.js" | xargs browserify -o ./browser/tests.js' + 'find test/ -type f -name "*.js" | xargs ./node_modules/.bin/browserify -o ./browser/tests.js' ])); gulp.task('browser-all', ['errors'], function(callback) { From 10a92cdebba27a8e4e6c1eee046e58562e4072b5 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Fri, 5 Dec 2014 09:54:58 -0500 Subject: [PATCH 2/4] Tests: Remove devDependency and change to relative path names --- gulpfile.js | 4 ++-- package.json | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index d80d789..010328d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -92,11 +92,11 @@ gulp.task('lint', function() { }); gulp.task('browser', ['errors'], shell.task([ - './node_modules/.bin/browserify index.js --insert-global-vars=true --standalone=bitcore -o ./browser/bitcore.js' + './node_modules/.bin/browserify index.js --insert-global-vars=true --standalone=bitcore -o browser/bitcore.js' ])); gulp.task('browser-test', shell.task([ - 'find test/ -type f -name "*.js" | xargs ./node_modules/.bin/browserify -o ./browser/tests.js' + 'find test/ -type f -name "*.js" | xargs ./node_modules/.bin/browserify -o browser/tests.js' ])); gulp.task('browser-all', ['errors'], function(callback) { diff --git a/package.json b/package.json index fc46d63..e56250a 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,6 @@ "chai": "~1.10.0", "closure-compiler-jar": "git://github.com/eordano/closure-compiler-jar.git", "gulp": "^3.8.10", - "gulp-browserify": "^0.5.0", "gulp-closure-compiler": "^0.2.9", "gulp-jsdoc": "^0.1.4", "gulp-jshint": "^1.9.0", From 6299033e45f91c07f42d0f01be9461af93bf47fe Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Fri, 5 Dec 2014 10:10:15 -0500 Subject: [PATCH 3/4] Tests: Add browser directory --- browser/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 browser/.gitignore diff --git a/browser/.gitignore b/browser/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/browser/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file From bc8d5fddf4bfb64e15efb90d939fc5fdbb6f44c2 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Fri, 5 Dec 2014 10:20:53 -0500 Subject: [PATCH 4/4] Tests: Remove devDependency --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index e56250a..e9548b0 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,6 @@ "gulp-jsdoc": "^0.1.4", "gulp-jshint": "^1.9.0", "gulp-mocha": "^2.0.0", - "gulp-rename": "^1.2.0", "gulp-shell": "^0.2.10", "mocha": "~2.0.1", "run-sequence": "^1.0.2",