I have just spent the last 5 days playing with this and trying to get the following to work together:
¬ Libsass
¬ Susy
¬ Gulp
But now I have it working I have just gone for 45s
to 700ms
This is something I feel I should share.
Initial Problem
Gulp
gulp.task('sass', function () {
return gulp.src('./frontend/sass/style.scss')
.pipe(sass({
'require':'susy'
}))
.pipe(gulp.dest('./app/www/css'))
});
Sass
@import "susy";
Inital Error
[23:58:08] Starting 'sass'...
stream.js:94
throw er; // Unhandled stream error in pipe.
^
Error: file to import not found or unreadable: susy
Current dir: C:/var/www/www.hutber.com/frontend/sass/
The complete working setup
package.json
Gulp sass Task
Sass
Errors
You will need to do the following to avoid the
may only compare numbers
error when running the taskUpdate node-sass's package.json
I had to update libsass's dependency as follows:
The above will become redundant as soon as
node-sass
update their dependency to use the newestlibsass
Last Step
Then inside my sass use
(1/4)
rather than just1/4
. This will force it to be treated as a number. Bug taken from https://github.com/sass/libsass/issues/590You should be able to run gulp
sass
without any errors.