Skip to content

Instantly share code, notes, and snippets.

@emgeee
Created November 9, 2014 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emgeee/7029ae19a18a704a9313 to your computer and use it in GitHub Desktop.
Save emgeee/7029ae19a18a704a9313 to your computer and use it in GitHub Desktop.
Sample gulpfile to blow up gulp-uglify.js
'use strict';
var gulp = require('gulp');
var gulpUglify = require('./index.js');
var through = require('through2');
var errorStream = through.obj(function(file, encoding, callback) {
// Do something improper
var b = a.c;
callback();
});
gulp.task('default', function() {
gulp.src('test/*.js')
.pipe(gulpUglify())
.pipe(errorStream);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment