I'm using gulp-coffee to compile my coffee files to js, nothing fancy.
I'm having a hard time figuring how to remove js files (in the dest js
directory) that DO NOT exist anymore in the source coffee
folder.
I'm quite sure this does not concern directly gulp-coffee, but I'm kind of clueless and I'm not that proficient in gulp.
My Files structure
/app/
/coffee (source)
/js (dest)
My gulp task
gulp.task('coffee', function() {
return gulp.src('app/coffee/**/*.coffee')
.pipe($.changed('./app/js/', {extension: '.js'}))
.pipe($.coffee())
.on('error', logCoffeeError)
.pipe(gulp.dest('app/js/'));
});