Answer the question
In order to leave comments, you need to log in
Does Gulp compile Sass files that start with an underscore?
There was a problem. After I changed gulp-ruby-sass to gulp-sass, when compiling sass files, scss files starting with an underscore are added to my dist folder.
Brief gulpfile.js
var gulp = require('gulp'),
sass = require('gulp-sass');
var src = {
root : 'src',
sass : 'src/sass/**/*.scss',
}
gulp.task('sass', function() {
gulp.src(src.sass)
.pipe(sourcemaps.init())
.pipe(plumber())
.pipe(autoprefixer("last 2 version", "ie>=9"))
.pipe(sourcemaps.write())
.pipe(gulp.dest('dist/css'))
.pipe(reload({stream:true}));
});
gulp.task('watch', ['sass'], function() {
gulp.watch(src.sass, ['sass']);
});
gulp.task('default', ['watch']);
Answer the question
In order to leave comments, you need to log in
Put all underscored files inside one main file via import and point this main file to gulp.src(src/sass/ myStyle.scss )
var src = {
root : 'src',
sass : ['src/sass/**/*.scss', '!src/sass/**/_*']
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question