Created
September 6, 2016 00:08
-
-
Save raminv80/9c75e148c2d94653f3258ae56752aa20 to your computer and use it in GitHub Desktop.
Gulp-sass pipe line with support for neat-burbon, autoprefixer, cleanCss, sourcemaps
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'), | |
plugins = require('gulp-load-plugins')(); | |
var bourbon = require('node-bourbon').includePaths, | |
neat = require('node-neat').includePaths; | |
function getTask(task) { | |
return require('./gulp/tasks/' + task)(gulp, plugins, site); | |
} | |
gulp.task('sass', function(){ | |
return gulp.src('src/assets/sass/**/*.scss') | |
.pipe(plugins.sourcemaps.init()) | |
.pipe(plugins.sass({ | |
includePaths: bourbon, | |
includePaths: neat | |
})) | |
.on('error',plugins.util.log.bind(plugins.util, 'Sass Error')) | |
.pipe(plugins.concat('styles.css')) | |
.pipe(plugins.autoprefixer()) | |
.pipe(plugins.cleanCss()) | |
.pipe(plugins.sourcemaps.write('.')) | |
.pipe(gulp.dest('dist/css/')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment