Here's my gulpfile.js
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
var chalk = require('chalk');
gulp.task('sass', function() {
return sass('assets/scss/*.scss')
.on('error', sass.logError)
.pipe(gulp.dest('assets/css'))
});
The error logging works, for example if I set an undefined variable in my Sass the terminal will show:
[13:31:23] Using gulpfile ~/Development/test/gulpfile.js
[13:31:23] Starting 'sass'...
[13:31:23] error assets/scss/style.scss (Line 3: Undefined variable: "$red".)
[13:31:23] Finished 'sass' after 248 ms
I have included chalk as I would like to change the color of the error in Terminal, but how would I go about doing that? I have tried:
.on('error', chalk.red(sass.logError))
But that doesn't work. Please help!