Gulp Sass does not work

0

So far everything worked on gulp perfectly, minus the sass.

My Code:

var sass = require('gulp-ruby-sass');

gulp.task('styles', function(){
    gulp.src('./src/scss/**/*.scss')
    .pipe(sass())
    .pipe(gulp.dest('./src/css/'));
})

gulp.task('default', function() { 
    gulp.run('styles');
});

The error it returns me is: Arguments to path.join must be string

Does anyone know the problem? Have you been through this?

    
asked by anonymous 28.01.2015 / 22:07

2 answers

2

In addition to having to include:

var gulp = require('gulp');

You need to use link and not gulp-ruby-sass. The folder structure is different and the interpreter is also.

    
07.06.2015 / 19:00
1

Using gulp-ruby-sass you need to have Ruby installed on your computer and the sass gem properly updated. Also missing the gulp and the code to compile the files is a bit different.

var gulp = require('gulp'),
    sass = require('gulp-ruby-sass');

gulp.task('styles', function(){
    sass('./src/scss/**/*.scss')
    .pipe(gulp.dest('./src/css/'));
});

gulp.task('default', ['styles']);

gulp-sass , which uses libsass instead of Ruby, does not need anything installed on your computer and works exactly the way you wrote it.

    
28.01.2016 / 16:03