Skip to content

Instantly share code, notes, and snippets.

@AleksandrMihhailov
Last active August 29, 2015 14:21
Show Gist options
  • Save AleksandrMihhailov/7072c571709972cde54a to your computer and use it in GitHub Desktop.
Save AleksandrMihhailov/7072c571709972cde54a to your computer and use it in GitHub Desktop.
gulp-coffee-sass
var gulp = require('gulp'),
gutil = require('gulp-util'),
coffee = require('gulp-coffee'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
concat = require('gulp-concat'),
autoPrefixer = require('gulp-autoprefixer'),
minifyCss = require('gulp-minify-css');
gulp.task('sass', function() {
gulp.src('./stylesheets.scss')
.pipe(sass().on('error', gutil.log)) // sass.logError
.pipe(autoprefixer('last 15 version'))
.pipe(minifycss())
.pipe(gulp.dest('./css'));
});
gulp.task('coffee', function() {
gulp.src('./app.coffee')
.pipe(coffee().on('error', gutil.log))
.pipe(uglify())
.pipe(gulp.dest('./js'));
});
gulp.task('watch', function() {
gulp.watch(['./app.coffee'], ['coffee']);
gulp.watch(['./stylesheets.scss'], ['sass']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment