Skip to content

Instantly share code, notes, and snippets.

@jonathanpath
Last active June 24, 2016 08:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanpath/9bd9cdf1e31be6445208 to your computer and use it in GitHub Desktop.
Save jonathanpath/9bd9cdf1e31be6445208 to your computer and use it in GitHub Desktop.
Gulpfile sass + livereload + autoprefixer
'use strict';
var gulp = require('gulp'),
sass = require('gulp-sass'),
livereload = require('gulp-livereload'),
autoprefixer = require('gulp-autoprefixer');
livereload({ start: true });
gulp.task('sass', function () {
gulp.src('scss/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(gulp.dest('css'))
.pipe(livereload());
});
gulp.task('sass:watch', function () {
livereload.listen();
gulp.watch('scss/**/*.scss', ['sass']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment