gulp-ruby-sass

Compile Sass to CSS with Ruby Sass

npm install gulp-ruby-sass
230 downloads in the last day
1 459 downloads in the last week
4 909 downloads in the last month

gulp-ruby-sass Build Status

Compile Sass to CSS with Ruby Sass

This is slower than gulp-sass, but more stable and feature-rich.

Issues with the output should be reported on the Sass issue tracker.

Install

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

You also need to have Ruby and Sass installed. If you're on OS X or Linux you probably already have Ruby; test with ruby -v in your terminal. When you've confirmed you have Ruby, run gem install sass to install Sass.

Usage

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

gulp.task('default', function () {
    return gulp.src('src/app.scss')
        .pipe(sass({sourcemap: true}))
        .pipe(gulp.dest('dist'));
});

API

Note that files starting with _ are ignored even if they match the globbing pattern.
This is done to match the expected Sass partial behaviour.

sass(options)

options

sourcemap

Type: Boolean
Default: false

Enable Source Map.

Requires Sass 3.3.0, which can be installed with gem install --pre sass

trace

Type: Boolean
Default: false

Show a full traceback on error.

unixNewlines

Type: Boolean
Default: false on Windows, otherwise true

Force Unix newlines in written files.

check

Type: Boolean
Default: false

Just check syntax, don't evaluate.

style

Type: String
Default: nested

Output style. Can be nested, compact, compressed, expanded.

precision

Type: Number
Default: 3

How many digits of precision to use when outputting decimal numbers.

quiet

Type: Boolean
Default: false

Silence warnings and status messages during compilation.

compass

Type: Boolean
Default: false

Make Compass imports available and load project configuration (config.rb located close to the gulpfile.js).

debugInfo

Type: Boolean
Default: false

Emit extra information in the generated CSS that can be used by the FireSass Firebug plugin.

lineNumbers

Type: Boolean
Default: false

Emit comments in the generated CSS indicating the corresponding source line.

loadPath

Type: String|Array

Add a (or multiple) Sass import path.

require

Type: String|Array

Require a (or multiple) Ruby library before running Sass.

cacheLocation

Type: String
Default: .sass-cache

The path to put cached Sass files.

noCache

Type: Boolean
Default: false

Don't cache to sassc files.

bundleExec

Type: Boolean
Default: false

Run sass with bundle exec: bundle exec sass.

License

MIT © Sindre Sorhus

npm loves you