Together with gulp-rev and gulp-sourcemaps
I can't use the sourcemap: true option, because then gulp-rev wouldn't pick up and rename the resulting sourcemap. But, when I use gulp-sourcemaps, no sourcemap is produced at all. Gulp-sourcemaps is working fine, but it does absolutely nothing when combined with gulp-compass.
Please consider this snippet:
gulp.src(["source/sass/**/*.scss"])
.pipe(sourcemaps.init())
.pipe(compass({
css: "build/css",
sass: "source/sass",
sourcemap: false,
comments: false,
style: "compressed"
}))
.pipe(rev())
.pipe(sourcemaps.write("."))
.pipe(gulp.dest("build/css"));
So rev refers to gulp-rev and sourcemaps refers to gulp-sourcemaps.
The rev() part works, oddly enough, but the non-revved css is also written, which shouldn't happen and is provably not gulp-rev's fault. It's not the biggest issue - the biggest issue is that sourcemaps are never created. Again, this is not gulp-sourcemaps's fault - it's gulp-compass's fault for (probably) not working nicely with gulp's piping paradigm (or whatever they call it). Why revving works fine, I have no idea, but it's not the point.
I cannot emphasize enough how important this is. In practice, it may work well with other plugins, but in theory it shouldn't. This is why sourcemaps doesn't work. And it's the reason why this makes gulp-compass frustrating to use - nothing says it shouldn't work, and yet it doesn't.