Srinivas
Srinivas

Reputation: 909

Gulp-compass not compiling sass to css

gulp.task('compass', function() {
    gulp.src('components/sass/styles.scss')
    .pipe(compass({ 
        config_file: 'config.rb',
        css: 'builds/development/css',
        sass: 'components/sass', 
        image: 'builds/development/images'
    }))
    .pipe(gulp.dest('builds/development/css')) });

Here I am trying to run gulp compass in command prompt.. its executing but not producing the output in the desired destination.. please help

Upvotes: 0

Views: 384

Answers (1)

ddprrt
ddprrt

Reputation: 7574

See here: Compass Line Number Comments Not Showing Up with Gulp

Be careful with gulp-compass, it is not a gulp plugin (albeit named so) and has been blacklisted by the Gulp community for quite a while. It does not what Gulp plugins are supposed to do (e.g. it's possible to run them without gulp.src and gulp.dest), and other plugins are already doing its work perfectly fine. One of those plugins is gulp-ruby-sass. This setup might work for you:

var sass = require('gulp-ruby-sass');
gulp.task('compass', function() {
   return sass(sassSources, {
     compass: true
   }).on('error', gutil.log))
   .pipe(gulp.dest('builds/dev/css'))
});

This uses gulp-ruby-sass which is able to run with the compass extension.

Upvotes: 3

Related Questions