Skip to content

Instantly share code, notes, and snippets.

@darylldoyle
Created September 17, 2014 15:57
Show Gist options
  • Save darylldoyle/3f61250b7fdcb6ac53b4 to your computer and use it in GitHub Desktop.
Save darylldoyle/3f61250b7fdcb6ac53b4 to your computer and use it in GitHub Desktop.
Sourcemaps not working with autoprefixer
var sass = require('gulp-ruby-sass');
var plumber = require('gulp-plumber');
var sourcemaps = require('gulp-sourcemaps');
var postcss = require('gulp-postcss');
gulp.task('sass', function() {
return gulp.src('uncompressed/scss/*.scss')
.pipe(plumber({
errorHandler: onError
}))
.pipe(sass({sourcemap: true, sourcemapPath: '../../uncompressed/scss', style: 'compressed'}))
.pipe(sourcemaps.init())
.pipe(postcss([autoprefixer]))
.pipe(sourcemaps.write('.'))
.pipe(size({title: 'css'}))
.pipe(gulp.dest('assets/css'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment