gulp-ruby-sass plugin not caching Sass files -


how cache sass files gulp-ruby-sass? seems should default option, that’s not happening. must missing something.

while watch task runs, every time change in app/styles/main.scss, gulp-ruby-sass compile bootstrap's sass again unnecessarily, taking around 4-5 seconds.

my app/styles/main.scss file looks this:

// project defaults @import “my_project/variables";  // bower:scss @import "../bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap.scss"; // endbower  // ... 

the gulpfile.js generated on 2014-11-25 using generator-gulp-webapp 0.1.0, linked master branch git repo.

see gulpfile.js here

styles function:

gulp.task('styles', function () {   return gulp.src('app/styles/main.scss')     .pipe($.plumber())     .pipe($.rubysass({       style: 'expanded',       precision: 10     }))     .pipe($.autoprefixer({browsers: ['last 1 version']}))     .pipe(gulp.dest('.tmp/styles')); }); 

.sass-cache folder being created, , folders includes main.scssc bootstrap's partials.

update

so far i've found 2 solutions (not caching though, faster compile time):

1) gulp-ruby-sass version 1.0 (alpha), faster , works source-maps. seems released. check this

2) gulp-sass uses c/c++ , it's fast, doesn't have features.

i expect issue related https://github.com/sindresorhus/gulp-ruby-sass/issues/111. although issue open still, can't not confirm issue when using generator-gulp-webapp 0.3.0 (and gulp-ruby-sass 1.0.1 sass 3.4.13 (selective steve))

generator-gulp-webapp 0.3.0 ships gulp-sass default. after installing gulp-webapp sass , bootstrap replace styles task follows:

gulp.task('styles', function () {     return $.rubysass('app/styles/main.scss')      .on('error', function (err) {       console.error('error!', err.message);    })     .pipe(gulp.dest('.tmp/styles'))     .pipe(reload({stream: true})); }); 

after changing main.scss watch task runs , outputs:

[bs] 1 file changed (main.css)  [15:53:17] finished 'styles' after 20 s 

now content of .sass-cache folder shown beneath:

/.sass-cache$ ls -la total 24 drwxrwxr-x 6 bass bass 4096 apr 13 15:40 . drwxrwxr-x 9 bass bass 4096 apr 13 15:48 .. drwxrwxr-x 2 bass bass 4096 apr 13 15:40 721aed65acc825809156d020625072c6ea20be50 drwxrwxr-x 2 bass bass 4096 apr 13 15:40 b311c6377fb599f57cc8c0d0c360c9b83a27e34b drwxrwxr-x 2 bass bass 4096 apr 13 15:40 d1eb2de86ef2be3a4571ad5415b5156c01618faf drwxrwxr-x 2 bass bass 4096 apr 13 15:53 e2b546d387a82bc59b03d84e84d775c05a23ac82 

as far understand e2b546d387a82bc59b03d84e84d775c05a23ac82 has been changed, contains cached version of main.scss.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -