Open eranimo opened 9 years ago
This doesn't work?
handler = (error) ->
{filename} = error
extension = path.extname(error.filename)
dirname = path.dirname(filename)
basename = path.basename(error.filename, '.coffee')
target = path.join(dirname, "#{basename}.js")
gulp.task "coffee", ->
return gulp.src(dedupeGlobs(paths.coffee))
.pipe(sourcemaps.init())
.pipe(ngClassify(ngClassifyOptions))
.pipe(coffeeStream).on('error', handler)
.pipe(ngAnnotate())
.pipe(sourcemaps.write())
.pipe(gulp.dest(COMPILE_PATH))
No it does not. Plumber still catches the unhandled error, but I can't do anything useful with it because its not an error object.
The only way to correctly catch the error with gulp-coffee is using Plumber. Without it, the error is caught only the first time and then the task will stop watching (I mean with gulp.watch)
I have a syntax error in one of the files being loaded into the task.
The following prints to the console:
I've tried adding gulp-plumber, but all it did was prevent gulp from exiting.