Created
July 6, 2016 16:27
-
-
Save brianpurkiss/e7b9f88506744f33c6a81d4c07ef0803 to your computer and use it in GitHub Desktop.
This gulp file's primary purpose is SASS compiling. It includes an auto compressor, prefixer, and watcher.
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
'use strict'; | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
// primary gulp build | |
gulp.task('sass', function () { | |
return gulp | |
.src('*.scss') | |
.pipe(sass( | |
{outputStyle: 'compressed'} | |
).on('error', sass.logError)) | |
.pipe(autoprefixer({ | |
browsers: ['last 2 versions'], | |
cascade: false | |
})) | |
.pipe(gulp.dest('')); | |
}); | |
// gulp watch | |
// watches the CSS folder and all nested folders | |
gulp.task('sassWatch', function () { | |
gulp.watch(['*.scss','../bootstrap/stylesheets/*.scss','../bootstrap/stylesheets/**/*.scss'], ['sass']); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment