appleboy / appleboy/gulp-compass
Together with gulp-rev and gulp-sourcemaps
- Dominant language
- JavaScript
- Stars
- 172
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
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](https://www.npmjs.com/package/gulp-rev/) and `sourcemaps` refers to [gulp-sourcemaps](https://www.npmjs.com/package/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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the provided gulp pipeline and inspect how gulp-compass handles streamed files and sourcemap metadata when sourcemap is false. Reproduce the combination with gulp-sourcemaps and gulp-rev; done means a sourcemap is generated and only the revved CSS output is written.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, sass
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100