Answer the question
In order to leave comments, you need to log in
Exceptions in Gulp src?
Good day to all! Created a separate file with SCSS variables. It is located in the same folder as the other SCSS files. I want it to not compile to CSS, I tried this:
gulp.task('sass', function(done) {
gulp.src("scss/*.scss",
"!scss/variables.scss")
.pipe(sass())
.pipe(gulp.dest("css/"))
done();
});
Не работает. Подскажите плиз как это сделать???
Answer the question
In order to leave comments, you need to log in
The src() method takes a string or an array as its first parameter. That is, it should be:
gulp.src(["scss/*.scss", "!scss/variables.scss"])
In general, it is better to tie it with the connection of styles in this way - there will be more flexibility.
You take one style.scss file, send it for compilation in the task, and already in this file, using the directive @import
, you control what you need and do not need to include, and you do not need to climb into the assembly to make changes.
If galp is version 4, then the solution is here https://stackoverflow.com/a/40098885/12213063
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question