Created
August 16, 2016 14:35
-
-
Save mkoller/cebf0dc1dfaba784bb3b98e541d7b671 to your computer and use it in GitHub Desktop.
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
// Convert sass to css | |
gulp.task('sass', function(){ | |
return gulp.src('sass/**/*.scss') // this globs all .scss files found in folder/subfolders | |
// Initializes sourcemaps | |
.pipe(sourcemaps.init()) // this produces a sourcemaps at the bottom of our .css file for browser debugging | |
.pipe(sass({ | |
errLogToConsole: true // this will log sass console errors in the terminal | |
})) | |
// Writes sourcemaps into the CSS file | |
.pipe(sourcemaps.write()) | |
.pipe(gulp.dest('css')) | |
.pipe(browserSync.reload({ | |
stream: true // this will reload browserync everytime we modify a .scss file | |
})) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment