Skip to content

Instantly share code, notes, and snippets.

@jacobarriola
Created September 15, 2015 14:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacobarriola/622831bbd3fe90394412 to your computer and use it in GitHub Desktop.
Save jacobarriola/622831bbd3fe90394412 to your computer and use it in GitHub Desktop.
Gulp file using sourcemaps
gulp.task('styles', function() {
gulp.src('assets/sass/**/*.scss')
.pipe(sourcemaps.init())
.pipe(sass({
outputStyle: 'compressed'
})
.on('error', notify.onError(function(error) {
return "Error: " + error.message;
}))
)
.pipe(autoprefixer({
browsers: ['last 2 versions', 'ie >= 9']
}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./assets/dist/css'))
.pipe(browserSync.stream({match: '**/*.css'}))
.pipe(notify({
message: "Styles task complete!"
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment