Install libsass because it works much faster than ruby sass, it works with node
npm install gulp-sass
Set gulp to load plugins because it loads so many plugins from your json and you do not need to declare in your gulpfile (carefully how much you use, because if you load too much, it interferes with performance)
npm install
var gulp = require('gulp'), $ = require('gulp-load-plugins')({ pattern: ['gulp-*', 'gulp.*'], replaceString: /\bgulp[\-.]/, lazy: true, camelize: true }); gulp.task('libsass', function () { gulp.src('sass/app.scss') .pipe($.sass({errLogToConsole: true})) .pipe($.autoprefixer({ browsers: ['last 2 versions'], cascade: false })) .pipe($.sourcemaps.write('app/css/map')) .pipe(gulp.dest('app/css')) });
source share