Answer the question
In order to leave comments, you need to log in
How to configure Gulp to build CSS files without import files inside?
Toaster, hello!
Faced a problem. There is a project structure in which all files are in the styles folder , but inside there are also separate sub-folders for the site sections: admin , blog , pages , etc.
At the root of each such folder there is a main.css file, through which they are imported through @import
files in the folder / subfolders, etc.
I would like Gulp to collect and put only main files in the necessary directories, but not touch what is imported.
The config is like this:
// Компиляция стилей
gulp.task('styles', function () {
return gulp.src('styles/**/*.sss', 'styles/admin/layout-admin.sss', 'styles/blog/layout-blog.sss')
.pipe(plumber({errorHandler: errorHandler}))
.pipe(postcss(processors, { parser: sugarss }))
.pipe(rucksack())
.pipe(rename(function (path) {
suffix: "-min",
path.extname = ".css";
return path;
}))
.pipe(gulp.dest(paths.build.styles));
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question