Skip to content

Instantly share code, notes, and snippets.

@crswll
Created April 3, 2014 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crswll/9959822 to your computer and use it in GitHub Desktop.
Save crswll/9959822 to your computer and use it in GitHub Desktop.
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer');
var paths = {
styles: {
src: ['src/scss/**/*'],
dest: 'build/css'
}
};
var options = {
sass: {
errLogToConsole: true,
sourceComments: 'map'
},
autoprefixer: [
'last 1 version',
'> 1%',
'ie 8',
'ie 7'
]
};
gulp.task('styles', function () {
gulp.src(paths.styles.src)
.pipe(sass(options.sass))
.pipe(autoprefixer.apply(undefined, options.autoprefixer))
.pipe(gulp.dest(paths.styles.dest));
});
gulp.task('watch', function () {
gulp.watch(paths.styles.src, ['styles']);
});
gulp.task('build', [
'styles',
]);
gulp.task('default', [
'build',
'watch'
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment