Answer the question
In order to leave comments, you need to log in
How to compile all sass files into one css?
Hello, there is such a GULP SASS task./
gulp.task('sass', function() {
return gulp.src('app/sass/**/*.sass')
.pipe(sass({outputStyle: 'expand'}).on("error", notify.onError()))
.pipe(rename({suffix: '.min', prefix : ''}))
.pipe(autoprefixer(['last 15 versions']))
.pipe(cleanCSS()) // Опционально, закомментировать при отладке
.pipe(gulp.dest('app/css'))
.pipe(browserSync.reload({stream: true}));
});
@import
put it in main.sass, but other css files are created along with it. 1 sass file = 1 css file
Answer the question
In order to leave comments, you need to log in
Created a couple more sass files to separate the code into blocksThe names of these files must start with
_
. For example, _foo.scss
.If you have a SCSS or Sass file that you want to import but don't want to compile to a CSS file, you can add an underscore to the beginning of the filename. This will tell Sass not to compile it to a normal CSS file. You can then import these files without using the underscore.
For example, you might have _colors.scss. Then no _colors.css file would be created, and you can do
and _colors.scss would be imported.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question