gulp-ruby-sass 0,0 editorconfig travis-ci npm

Compile Sass to CSS with Ruby Sass

gulp-ruby-sass Build Status

Compiles Sass with the Sass gem and pipes the results into a gulp stream.
To compile Sass with libsass, use gulp-sass

⚛ Learn React in just a couple of afternoons with this awesome React course by Wes Bos


$ npm install --save-dev gulp-ruby-sass

Requires Sass >=3.4.


sass(source, [options])

Use gulp-ruby-sass instead of gulp.src to compile Sass files.

const gulp = require('gulp');
const sass = require('gulp-ruby-sass');

gulp.task('sass', () =>
		.on('error', sass.logError)


Type: string, array

File or glob pattern (source/**/*.scss) to compile. Ignores files prefixed with an underscore. Directory sources are not supported.


Type: object

Object containing plugin and Sass options.


Type: boolean
Default: false

Run Sass with bundle exec.


Type: boolean
Default: false

Initialize and pass Sass sourcemaps to gulp-sourcemaps. Note this option replaces Sass’s sourcemap option.

const gulp = require('gulp');
const sass = require('gulp-ruby-sass');
const sourcemaps = require('gulp-sourcemaps');

gulp.task('sass', () =>
	sass('source/file.scss', {sourcemap: true})
		.on('error', sass.logError)
		// for inline sourcemaps
		// for file sourcemaps
		.pipe(sourcemaps.write('maps', {
			includeContent: false,
			sourceRoot: 'source'

Type: string

Identical to gulp.src’s base option.


Type: string
Default: System temp directory

This plugin compiles Sass files to a temporary directory before pushing them through the stream. Use tempDir to choose an alternate directory if you aren’t able to use the default OS temporary directory.


Type: boolean
Default: false

Emit a gulp error when Sass compilation fails.


Type: boolean
Default: false

Log the spawned Sass or Bundler command. Useful for debugging.

Sass options

Any additional options are passed directly to the Sass executable. The options are camelCase versions of Sass’s options parsed by dargs.

Run sass -h for a complete list of Sass options.

gulp.task('sass', () =>
	sass('source/file.scss', {
			precision: 6,
			stopOnError: true,
			cacheLocation: './',
			loadPath: [ 'library', '../../shared-components' ]
		.on('error', sass.logError)


Convenience function for pretty error logging.


In rare cases you may need to clear gulp-ruby-sass’s cache. This sync function deletes all files used for Sass caching. If you’ve set a custom temporary directory in your task you must pass it to clearCache.


This plugin wraps the Sass gem for the gulp build system. It does not alter Sass’s output in any way. Any issues with Sass output should be reported to the Sass issue tracker.

Before submitting an issue please read the contributing guidelines.


MIT © Sindre Sorhus

Top Contributors

robwierzbowski sindresorhus UltCombo lkmorlan kevva sndrs vohof kjcpaas Fantomas42 KariHe AlbertoElias MarkLeMerise hason mathiasbynens nschonni petebrowne rjm101 timrwood vkammerer stryju


package version
dev gulp ^3.8.11
gulp-sourcemaps ^2.2.0
mocha *
vinyl-file ^2.0.0
xo ^0.16.0
convert-source-map ^1.0.0
dargs ^2.0.3
cross-spawn ^5.0.0
each-async ^1.0.0
escape-string-regexp ^1.0.3
glob ^7.0.3
glob2base 0.0.12
gulp-util ^3.0.4
md5-hex ^1.0.2
object-assign ^4.0.1
os-tmpdir ^1.0.0
path-exists ^2.0.0
rimraf ^2.2.8


-   v2.1.0 zip tar
-   v0.7.1 zip tar
-   v0.7.0 zip tar
-   v0.6.0 zip tar
-   v0.5.0 zip tar
-   v0.4.3 zip tar
-   v0.4.2 zip tar
-   v0.4.1 zip tar
-   v0.4.0 zip tar
-   v0.3.1 zip tar
-   v0.3.0 zip tar
-   v0.2.0 zip tar
-   v0.1.2 zip tar
-   v0.1.1 zip tar
-   v0.1.0 zip tar
-   2.0.6 zip tar
-   2.0.5 zip tar
-   2.0.4 zip tar
-   2.0.3 zip tar
-   2.0.2 zip tar
-   2.0.1 zip tar
-   2.0.0 zip tar
-   1.4.0 zip tar
-   1.3.0 zip tar
-   1.2.0 zip tar
-   1.1.0 zip tar
-   1.0.5 zip tar
-   1.0.4 zip tar
-   1.0.3 zip tar
-   1.0.2 zip tar