Created
February 16, 2016 13:24
-
-
Save JoanClaret/588d2e35dc412e868635 to your computer and use it in GitHub Desktop.
send variable to gulp
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 isProduction = true; | |
if(gutil.env.production === true) { | |
isProduction = true; | |
} | |
gulp.task('sass-private', function () { | |
return gulp.src('resources/assets/scss/styles-private.scss') | |
.pipe(plumber({errorHandler: onError})) | |
.pipe(sass({compress: false}).on('error', gutil.log)) | |
.pipe(autoprefixer({ | |
browsers: ['last 2 versions'], | |
cascade: false | |
})) | |
.pipe(isProduction ? cssnano() : gutil.noop()) | |
.pipe(rename("private.css")) | |
.pipe(gulp.dest('public/css')) | |
.pipe(livereload()) | |
// create version files | |
.on('end', function() { | |
gulp.start('version'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment