8

I'm trying to get gulp to compile some sass, however I can't seem to get it to write out anything. I'm not seeing an error and using sass to compile myself is successful. Here is what my config looks like:

var sass = require('gulp-sass');
var baseOutputDir = '../publish/homepage';
var cssOutputDir = baseOutputDir + '/css';
gulp.task('sass', function () {
    gulp.src(['./css-lib/Bootstrap/3.3.1/assets/stylesheets/_bootstrap.scss'])
        .pipe(sass())
        .on('error', function (err) { console.log(err.message); })
        .pipe(gulp.dest(cssOutputDir));
})

The bootstrap is a clone of https://github.com/twbs/bootstrap-sass

Steven
  • 4,826
  • 3
  • 35
  • 44

2 Answers2

11

I'm use to LESS and not Sass. A file with an underscore in front won't generate a css file.

Steven
  • 4,826
  • 3
  • 35
  • 44
5

I had the same problem. As @Steven pointed out _filename do not generate css files. Just rename/copy the _bootstrap.scss to something without leading underscore

gulp.src(['./css-lib/Bootstrap/3.3.1/assets/stylesheets/bootstrap.scss'])
pravin
  • 1,106
  • 1
  • 18
  • 27