1

I want to compile my scss file using gulp but it doesn't output anything. Here is my task:

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

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

When I run, everything works fine but my css folder is empty.

output

Has anyone encountered the same issue?

Jeroen
  • 60,696
  • 40
  • 206
  • 339

1 Answers1

0

A bit of potential semi-colon insertion (you should read your code as if there was a semi-colon after return, i.e. you should not let it float on its own on one line), and a bit of different gulp-ruby-sass syntax, perhaps? Here's what works for me:

"use strict";

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

gulp.task('default', [], function() {
  return sass('scss/*.scss')
    .pipe(gulp.dest('css/style.css'));
});
Community
  • 1
  • 1
Jeroen
  • 60,696
  • 40
  • 206
  • 339