Here's a simplified version of the task I'm using:
g = require 'gulp'
$ = require('gulp-load-plugins')()
g.task 'vendor:styles', ->
sass_filter = $.filter('*.scss')
less_filter = $.filter('*.less')
g.src(['vendor/font-awesome-4.2.0/scss/font-awesome.scss', 'vendor/bootstrap-3.2.0/less/bootstrap.less'])
.pipe $.sourcemaps.init()
.pipe(sass_filter).pipe($.sass()).pipe(sass_filter.restore())
.pipe(less_filter).pipe($.less(strictMath: true)).pipe(less_filter.restore())
.pipe $.concat('vendor.css')
.pipe $.sourcemaps.write('./maps')
.pipe g.dest('.tmp/styles/vendor')
(This is Coffeescript, but the Javascript is almost identical. I can provide the JS if the above is difficult to parse.)
When running the above, gulp-sourcemaps throws:
gulp-sourcemap-write: source file not found:/Users/pikeas/Documents/code/pypjs/crypto/front/merged/vendor/font-awesome-4.2.0/scss/normalize.less
...(repeated x20, for print.less, carousel.less, etc)
In other words, it's looking for Bootstrap's files in the Font Awesome directory. I've tried using gulp-if instead of gulp-filter, but that also fails with the same error.
What's the right way to write this task?