I'm trying to use gulp and gulp-sass to compile bower components in my project. I am using Windows 8.
The problem Im having is that gulp-sass seems not to be working. Or at least not giving me the result of the compilation. The weird thing about it is, that I dont even get error messages or something.
I just dont get any result whatsoever in my output directory.
The gulpfile.js:
"use strict";
var gulp = require("gulp"),
sass = require("gulp-sass"),
bowerFiles = require("main-bower-files"),
gulpFilter = require("gulp-filter"),
concat = require("gulp-concat");
gulp.task("bower", function () {
var cssFilter = gulpFilter(["**/*.css", "**/*.scss"]);
return gulp.src(bowerFiles())
.pipe(cssFilter)
.pipe(sass())
.pipe(concat("bower.css"))
.pipe(gulp.dest("wwwroot"))
.pipe(cssFilter.restore());
});
I have tried several things until now:
I have tried to compile via commandline with the command
sass --trace bower_components\bootstrap-sass-pfficial\assets\stylesheets\_bootstrap.scss:wwwroot\bower.css
this worked and i got the expected result. Therefore i assume the sass installation works fine.
Another thing i tried is, I removed the ".pipe(sass())" line from the code above to just concat and copy the files. That worked.
And the third test was, not to use the main-bower-files to get the files but use a fixed path with sass:
gulp.src("bower_components/bootstrap-sass-official/assets/stylesheets/_bootstrap.scss")
But that didnt work either. Again no result.
I am using the following dependencies:
"dependencies": {
"gulp": "^3.6.0",
"gulp-sass": "^1.3.3",
"main-bower-files": "^2.6.2",
"gulp-filter": "^2.0.2",
"gulp-concat": "^2.5.2"
}