Created
January 20, 2015 11:42
-
-
Save lunelson/6332d7928f0d7b5fe144 to your computer and use it in GitHub Desktop.
Gulp configuration for running sassc directly
This file contains hidden or 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 autoprefixer = require('gulp-autoprefixer'); | |
var buffer = require('vinyl-buffer'); | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var plumber = require('gulp-plumber'); | |
var rename = require("gulp-rename"); | |
var run = require('gulp-run'); | |
gulp.task('sassc', function () { | |
gulp.src('test/test.scss', { buffer: false }) | |
.pipe(plumber(function(err) { | |
gutil.beep(); | |
var errorTxt = err.message +'\n\n'+ err.source; | |
gutil.log(gutil.colors.red(errorTxt)); | |
})) | |
.pipe(run('/applications/libsass/sassc/bin/sassc -s', {verbosity: 1})) | |
.pipe(rename(function (path) { path.extname = ".css"; })) | |
.pipe(buffer()) | |
.pipe(autoprefixer()) | |
.pipe(gulp.dest('test/')); | |
}); | |
gulp.task('watch', function () { | |
gulp.watch('test/*.scss', ['sassc']); | |
}); | |
gulp.task('default', ['sassc', 'watch']); |
HELLO
HELLO
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HELLO