Skip to content

Instantly share code, notes, and snippets.

@lunelson
Created January 20, 2015 11:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lunelson/6332d7928f0d7b5fe144 to your computer and use it in GitHub Desktop.
Save lunelson/6332d7928f0d7b5fe144 to your computer and use it in GitHub Desktop.
Gulp configuration for running sassc directly
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']);
@bantaernest
Copy link

HELLO

@nicolas-t
Copy link

HELLO

@funglaub
Copy link

funglaub commented Feb 1, 2018

HELLO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment