Closed fschroiff closed 8 years ago
Hi @fschroiff! What Sass package are you using?
Hi @tysongach, I am using gulp-sass 2.2.0 (which uses node-sass 3.4.2).
Buen día, no se si sirva pero a mi no me da problemas con esta configuración en el gulpfile.js
gulp.task('sass', function(){
return gulp.src('./scss/**/*.scss')
.pipe(sass().on('err', sass.logError))
.pipe(gulp.dest("./dist/css"))
y bourbon lo tengo instalado dentro de la carpeta scss de esta manera:
y no me genera ningún problema al ejecutar la tarea.
@fschroiff you may be missing the sass path declaration in your gulpfile. Check out the Bitters contrib gulpfile. It works so there may be something that your gulpfile needs.
You could probably use the following…
var bourbon = require("bourbon").includePaths,
autoprefix = require("gulp-autoprefixer"),
connect = require("gulp-connect"),
gulp = require("gulp"),
sass = require("gulp-sass");
var paths = {
scss: [
"./some sass dir/**/*.scss",
"./some other sass dir/*.scss"
]
};
gulp.task("sass", function () {
return gulp.src(paths.scss)
.pipe(sass({
includePaths: ["styles"].concat(bourbon)
}))
.pipe(autoprefix("last 2 versions"))
.pipe(gulp.dest("where ever your css goes "))
.pipe(connect.reload());
});
@fschroiff any word on this? get things sorted out?
@fschroiff @whmii
I solved this by doing the following (reduced code for brevity):
const bourbon = require("bourbon");
const neat = require("bourbon-neat");
// ...your code before.
.pipe(_.sass({
includePaths: [
neat.includePaths,
bourbon.includePaths
]
}))
// ...your code after.
Hope this helps someone out.
Fresh install, this is in my package.json:
This is in my gulpfile:
This is in my style.scss
This is the error I get:
What changed? I have several other projects where this exact setup works fine.