gulp-ruby-sass
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 with npm
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.
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
gulp.task('default', function () {
gulp.src('src/app.scss')
.pipe(sass({sourcemap: true}))
.pipe(gulp.dest('dist'));
});
Note that files starting with _
are ignored even if they match the globbing pattern.
This is done to match the expected Sass partial behaviour.
Type: Boolean
Default: false
Enable Source Map.
Requires Sass 3.3.0, which can be installed with gem install --pre sass
Type: Boolean
Default: false
Show a full traceback on error.
Type: Boolean
Default: false
on Windows, otherwise true
Force Unix newlines in written files.
Type: Boolean
Default: false
Just check syntax, don't evaluate.
Type: String
Default: nested
Output style. Can be nested
, compact
, compressed
, expanded
.
Type: Number
Default: 3
How many digits of precision to use when outputting decimal numbers.
Type: Boolean
Default: false
Silence warnings and status messages during compilation.
Type: Boolean
Default: false
Make Compass imports available and load project configuration (config.rb
located close to the gulpfile.js
).
Type: Boolean
Default: false
Emit extra information in the generated CSS that can be used by the FireSass Firebug plugin.
Type: Boolean
Default: false
Emit comments in the generated CSS indicating the corresponding source line.
Type: String|Array
Add a (or multiple) Sass import path.
Type: String|Array
Require a (or multiple) Ruby library before running Sass.
Type: String
Default: .sass-cache
The path to put cached Sass files.
Type: Boolean
Default: false
Don't cache to sassc files.
Type: Boolean
Default: false
Run sass
with bundle exec: bundle exec sass
.
MIT © Sindre Sorhus