Last active
August 29, 2015 14:01
-
-
Save rodleviton/e3f903612e14584af9b9 to your computer and use it in GitHub Desktop.
Basic gulp file to get project up and running
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'), | |
minifycss = require('gulp-minify-css'), | |
autoprefixer = require('gulp-autoprefixer'), | |
notify = require('gulp-notify'), | |
sass = require('gulp-ruby-sass'), | |
rename = require('gulp-rename'); | |
gulp.task('css', function() { | |
return gulp.src('public/assets/sass/application.scss') | |
.pipe(sass({ style: 'expanded' })) | |
.pipe(autoprefixer()) | |
.pipe(gulp.dest('public/css')) | |
.pipe(rename({suffix: '.min'})) | |
.pipe(minifycss()) | |
.pipe(gulp.dest('public/css')) | |
.pipe(notify({ message: 'CSS compiled successfully!' })); | |
}); | |
gulp.task('default', function() { | |
gulp.run('css'); | |
gulp.watch('public/assets/sass/**/*.scss', function() { | |
gulp.run('css'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment