diff --git a/browser/.gitignore b/browser/.gitignore deleted file mode 100644 index c96a04f00..000000000 --- a/browser/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 33907f225..2b8fb861e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -80,11 +80,15 @@ gulp.task('test', function(callback) { * File generation */ -gulp.task('browser:uncompressed', ['errors'], shell.task([ +gulp.task('browser:makefolder', shell.task([ + 'if [ ! -d "browser" ]; then mkdir browser; fi' +])); + +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', ['errors'], function() { +gulp.task('browser:compressed', ['browser:makefolder', 'errors'], function() { return gulp.src('dist/bitcore.js') .pipe(closureCompiler({ fileName: 'bitcore.min.js', @@ -97,7 +101,7 @@ gulp.task('browser:compressed', ['errors'], function() { .pipe(gulp.dest('dist')); }); -gulp.task('browser:maketests', shell.task([ +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' ]));