appleboy / appleboy/gulp-compass
Sourcemaps not ending up in the stream
- Dominant language
- JavaScript
- Stars
- 172
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
Please consider this task:
``` javascript
gulp.task("dist-build-css", () => {
/* Compile Sass files using compass to the `css` directory, including sourcemaps and excluding line comments */
return gulp.src([ "includes/sass/**/*.scss", "!includes/sass/**/_*.scss" ])
.pipe(
compass({
sass: "includes/sass",
css: "includes/css",
style: "compressed",
comments: true,
sourcemap: true
})
)
.pipe(gulp.dest("dist/includes/css"))
;
});
```
The problem here is that the sourcemap does not end up in the `dist/includes/css` directory, quite possibly because it's not included in the stream after compass() is done. This will make trouble if I need to further process it, for example if I want to fingerprint the files.
The config options `css` and `sass` are identical to my config.rb file, as instructed. When I set `css` to my dist directory, the sourcemap ends up there as expected, but it's still not included in the stream, so it won't be picked up by any subsequent plugins...
Or should I be using gulp-sourcemap to generate sourcemaps? That'll be trouble as well, since I need to exclude sass includes (starting with `_`) but they do need to go into sourcemaps.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the dist-build-css task and the compass() call, then inspect how the plugin passes files to gulp.dest("dist/includes/css"). Verify whether the generated sourcemap is present in the stream and can be processed by a later plugin; done means it reaches the destination and downstream pipeline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, sass
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100