Skip to content

Instantly share code, notes, and snippets.

@erickolivares
Last active February 5, 2016 23:29
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 erickolivares/fd3fa28259fd2d2da5b3 to your computer and use it in GitHub Desktop.
Save erickolivares/fd3fa28259fd2d2da5b3 to your computer and use it in GitHub Desktop.
Gulp JS SASS
var gulp = require('gulp'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps');
var input = './scss/**/*.scss',
output = './css';
gulp.task('sass', function () {
return gulp.src(input)
.pipe(sourcemaps.init())
.pipe(sass({outputStyle: 'compressed'}))
.pipe(sourcemaps.write())
.pipe(gulp.dest(output));
});
gulp.task('watch', function() {
return gulp
.watch(input, ['sass'])
.on('change', function(event) {
});
});
gulp.task('run', ['watch', 'sass']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment