M
M
myskypesla2016-06-05 12:14:16
Sass
myskypesla, 2016-06-05 12:14:16

How to ignore template files when building sass?

Hello everyone, there is a structure like this:
sass
|----> templates
-----|---->fonts.scss
-----|---->elements.scss
-----|- --->variables.scss
|----> main.scss
Files from the templates folder added to main.scss using @import .
Question: how can I make only the main.css file appear in the dist/css folder when compiling?
This option with ignoring in the task is not suitable, because. I will have many nested pages, for which there will be a main.scss.

gulp.task('sass', function () {
  return gulp.src(['src/**/*.scss, '!src/**/*_.scss'])
    .pipe(gulp.dest('dist/css'))
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question