Add errLogToConsole option

dev
David Manning 2014-01-12 22:27:45 -08:00
parent 5a92cdf16c
commit 6d63ff3220
2 changed files with 12 additions and 3 deletions

View File

@ -24,11 +24,17 @@ gulp.task('sass', function () {
});
```
Options passed as a hash into ```sass()``` will be passed along to [```node-sass```](https://github.com/andrew/node-sass)
Options passed as a hash into `sass()` will be passed along to [`node-sass`](https://github.com/andrew/node-sass)
## gulp-sass specific options
#### `errLogToConsole`
If you pass `errLogToConsole: true` into the options hash, sass errors will be logged to the console instead of generating a `gutil.PluginError` object. Use this option with `gulp.watch` to keep gulp from stopping every time you mess up your sass.
#Imports and Partials
If you want to use imports or partials templates, you'll need to pass the ```includePaths``` option along to node-sass. So if you have files like this:
If you want to use imports or partials, you'll need to pass the `includePaths` option along to node-sass. So if you have files like this:
scss/includes/_settings.scss:
@ -64,4 +70,3 @@ gulp.task('sass', function () {
.pipe(gulp.dest('./css'));
});
```

View File

@ -28,6 +28,10 @@ module.exports = function (options) {
}
opts.error = function (err) {
if (opts.errLogToConsole) {
console.log(err);
return cb();
}
return cb(new gutil.PluginError('gulp-sass', err));
}