Created
July 13, 2015 08:30
-
-
Save traverse/b18c213b500b9d3e6509 to your computer and use it in GitHub Desktop.
Small fix for a problem I was having with sourcemaps and gulp-sass/gulp-autoprefixer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require("gulp"); | |
var sourcemaps = require("gulp-sourcemaps"); | |
var sass = require("gulp-sass"); | |
var autoprefixer = require("gulp-autoprefixer"); | |
gulp.task("sass", function() { | |
gulp.src("scss/**/*.scss") | |
.pipe(sourcemaps.init()) | |
.pipe(sass().on("error", sass.logError)) | |
.pipe(sourcemaps.write()) | |
.pipe(sourcemaps.init({ | |
loadMaps: true | |
})) | |
.pipe(autoprefixer()) | |
.pipe(sourcemaps.write()) | |
.pipe(gulp.dest("css")) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment