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';
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) {

2
package.json

@ -87,12 +87,10 @@
"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",
"gulp-mocha": "^2.0.0",
"gulp-rename": "^1.2.0",
"gulp-shell": "^0.2.10",
"mocha": "~2.0.1",
"run-sequence": "^1.0.2",

Loading…
Cancel
Save