Browse Source

Merge pull request #670 from braydonf/bug/browser-build-speed

Tests: Speed up browser build
patch-2
Manuel Aráoz 10 years ago
parent
commit
5f4eb204b4
  1. 2
      browser/.gitignore
  2. 16
      gulpfile.js
  3. 2
      package.json

2
browser/.gitignore

@ -0,0 +1,2 @@
*
!.gitignore

16
gulpfile.js

@ -11,12 +11,10 @@
'use strict'; 'use strict';
var gulp = require('gulp'); var gulp = require('gulp');
var browserify = require('gulp-browserify');
var closureCompiler = require('gulp-closure-compiler'); var closureCompiler = require('gulp-closure-compiler');
var jsdoc = require('gulp-jsdoc'); var jsdoc = require('gulp-jsdoc');
var jshint = require('gulp-jshint'); var jshint = require('gulp-jshint');
var mocha = require('gulp-mocha'); var mocha = require('gulp-mocha');
var rename = require('gulp-rename');
var runSequence = require('run-sequence'); var runSequence = require('run-sequence');
var shell = require('gulp-shell'); var shell = require('gulp-shell');
@ -93,18 +91,12 @@ gulp.task('lint', function() {
.pipe(jshint.reporter('default')); .pipe(jshint.reporter('default'));
}); });
gulp.task('browser', ['errors'], function() { gulp.task('browser', ['errors'], shell.task([
return gulp.src('index.js') './node_modules/.bin/browserify index.js --insert-global-vars=true --standalone=bitcore -o browser/bitcore.js'
.pipe(browserify({ ]));
insertGlobals: true,
standalone: 'bitcore'
}))
.pipe(rename('bitcore.js'))
.pipe(gulp.dest('browser'));
});
gulp.task('browser-test', shell.task([ 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) { gulp.task('browser-all', ['errors'], function(callback) {

2
package.json

@ -87,12 +87,10 @@
"chai": "~1.10.0", "chai": "~1.10.0",
"closure-compiler-jar": "git://github.com/eordano/closure-compiler-jar.git", "closure-compiler-jar": "git://github.com/eordano/closure-compiler-jar.git",
"gulp": "^3.8.10", "gulp": "^3.8.10",
"gulp-browserify": "^0.5.0",
"gulp-closure-compiler": "^0.2.9", "gulp-closure-compiler": "^0.2.9",
"gulp-jsdoc": "^0.1.4", "gulp-jsdoc": "^0.1.4",
"gulp-jshint": "^1.9.0", "gulp-jshint": "^1.9.0",
"gulp-mocha": "^2.0.0", "gulp-mocha": "^2.0.0",
"gulp-rename": "^1.2.0",
"gulp-shell": "^0.2.10", "gulp-shell": "^0.2.10",
"mocha": "~2.0.1", "mocha": "~2.0.1",
"run-sequence": "^1.0.2", "run-sequence": "^1.0.2",

Loading…
Cancel
Save