SASS plugin for gulp.
npm install gulp-sass
Something like this:
var gulp = ;var sass =gulp;
Options passed as a hash into
sass() will be passed along to
gulp-sass specific options
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.
Pass in your own callback to be called upon successful compilaton by node-sass. The callback has the form
callback(css), and is passed the compiled css as a string. Note: This does not prevent gulp-sass's default behavior of writing the output css file.
Pass in your own callback to be called upon a sass error from node-sass. The callback has the form
callback(err), where err is the error string generated by libsass. Note: this does prevent an actual
gulpPluginError object from being created.
Imports and Partials
gulp-sass now automatically passes along the directory of every scss file it parses as an include path for node-sass. This means that as long as you specify your includes relative to path of your scss file, everything will just work.