Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Together with gulp-rev and gulp-sourcemaps #143

Open
thany opened this issue Oct 24, 2016 · 0 comments
Open

Together with gulp-rev and gulp-sourcemaps #143

thany opened this issue Oct 24, 2016 · 0 comments

Comments

@thany
Copy link

thany commented Oct 24, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant