rubysassgulpgulp-ruby-sass

How to set SASS settings to noCache = True? Using Gulp & gulp-ruby-sass


I'm not using compass or codekit, just Gulp to compile my SASS files. And a .sass-cache folder gets generated. I'd rather it not and don't mind the extra nano secs it would take to compile, because it adds too much to my quick find in Sublime Text.

In the docs for gulp-ruby-sass I found the option for noCache however I'm not sure where to set it or what the syntax is. Would you know? Somewhere in my GulpFile?

https://www.npmjs.com/package/gulp-ruby-sass

noCache
Type: Boolean
Default: false

Here is my Gulp Task

gulp.task('web_css', function() {
    return sass('bower_components/sass-smacss/sass/manage.scss', { style: 'compressed' })
        .pipe(sass({ noCache: true }))
        .pipe(sourcemaps.init())
        .pipe(sourcemaps.write('./maps'))
        .pipe(gulp.dest('assets/css/'))
});

Solution

  • This is a valid example of how to do it:

    gulp.task('sass', function () {
      return sass('bower_components/sass-smacss/sass/manage.scss', 
          { noCache: true, style: 'compressed' }
         )
         .pipe(gulp.dest('path/to/your/css'))
      );;
    });
    

    When you apply the sass function, you have to pass your option as a parameters.