Skip to content

Instantly share code, notes, and snippets.

@lazd
Created December 14, 2013 01:12
Show Gist options
  • Save lazd/7954381 to your computer and use it in GitHub Desktop.
Save lazd/7954381 to your computer and use it in GitHub Desktop.
es.map file undefined
var gulp = require('gulp');
var es = require('event-stream');
function plugalug() {
return es.map(function(file) {
if (typeof file === 'undefined') {
throw new Error('File was undefined!');
}
});
}
gulp.task('test-watch', function() {
return gulp.src('gulpfile.js')
.pipe(plugalug());
})
gulp.task('default', function() {
gulp.watch('gulpfile.js', function(event) {
gulp.run('test-watch')
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment