Skip to content
This repository has been archived by the owner on Jun 29, 2018. It is now read-only.

Commit

Permalink
Use pump so errors during minification are correctly propagated
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel15 committed Dec 19, 2016
1 parent d4d5837 commit db026fa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
29 changes: 17 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const gulp = require('gulp');
const lazypipe = require('lazypipe');
const pump = require('pump');
const rename = require('gulp-rename');
const webpack = require('webpack');
const webpackStream = require('webpack-stream');
Expand Down Expand Up @@ -72,17 +73,21 @@ const minifyAndRename = lazypipe()
gulp.task('default', ['build']);
gulp.task('build', ['build-babel', 'build-babili']);

gulp.task('build-babel', () => {
return gulp.src('src/index.js')
.pipe(webpackBuild('babel.js', 'Babel', require('./package.json').version))
.pipe(gulp.dest('.'))
.pipe(minifyAndRename())
.pipe(gulp.dest('.'));
gulp.task('build-babel', cb => {
pump([
gulp.src('src/index.js'),
webpackBuild('babel.js', 'Babel', require('./package.json').version),
gulp.dest('.'),
minifyAndRename(),
gulp.dest('.'),
], cb);
});
gulp.task('build-babili', () => {
return gulp.src('src/babili.js')
.pipe(webpackBuild('babili.js', 'Babili', require('./packages/babili-standalone/package.json').version))
.pipe(gulp.dest('packages/babili-standalone/'))
.pipe(minifyAndRename())
.pipe(gulp.dest('packages/babili-standalone/'));
gulp.task('build-babili', cb => {
pump([
gulp.src('src/babili.js'),
webpackBuild('babili.js', 'Babili', require('./packages/babili-standalone/package.json').version),
gulp.dest('packages/babili-standalone/'),
minifyAndRename(),
gulp.dest('packages/babili-standalone/'),
], cb);
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
"npm-check-updates": "^2.8.6",
"react": "^15.4.0",
"webpack": "^1.13.3",
"pump": "^1.0.1",
"webpack-stream": "^3.2.0"
},
"keywords": [
Expand Down

0 comments on commit db026fa

Please sign in to comment.