Skip to content

Instantly share code, notes, and snippets.

@scarnago
Forked from gaspanik/gulpfile.js
Last active August 29, 2015 14:14
Show Gist options
  • Save scarnago/70325ffbf9d12331e94a to your computer and use it in GitHub Desktop.
Save scarnago/70325ffbf9d12331e94a to your computer and use it in GitHub Desktop.
// npm install gulp gulp-ruby-sass gulp-minify-css gulp-rename --save-dev
var gulp = require('gulp')
, sass = require('gulp-ruby-sass')
, minifycss = require('gulp-minify-css')
, rename = require('gulp-rename');
gulp.task('styles', function() {
return gulp.src('stylesheets/*.scss')
.pipe(sass({ style: 'expanded' }))
.pipe(gulp.dest('css'))
.pipe(rename({suffix: '.min'}))
.pipe(minifycss())
.pipe(gulp.dest('css'))
});
gulp.task('default', function() {
gulp.run('styles');
gulp.watch('stylesheets/**', function() {
gulp.run('styles');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment