Created
October 20, 2015 16:02
-
-
Save heyjohnmurray/7224eaef40441aab70e8 to your computer and use it in GitHub Desktop.
gulp sourcemap implementation
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'); | |
gulp.task('sass', function() { | |
return gulp.src(paths.styles.src + 'partials/*.scss') | |
.pipe(sourcemaps.init()) // all your piping needs to fit between the sourcemaps.init() and sourcemaps.write() | |
.pipe(concat('main.css')) | |
.pipe(autoprefixer({ | |
browsers: ['last 2 versions'], | |
cascade: false | |
})) | |
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError)) | |
.pipe(sourcemaps.write()) | |
.pipe(gulp.dest(paths.styles.dest)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment