mariocasciaro / gulp-concat-css

Concatenates css files, bubbling up import statements (as per the standard), and optionally rebasing urls and inlining local import statements.
MIT License
78 stars 19 forks source link

Unable to maintain compressed state with concatenation. #33

Open eugeneross opened 8 years ago

eugeneross commented 8 years ago

While running the gulp-ruby-sass task to convert .sass files to .css the style seems to be ignored while files are being concatenated. Example setup below that is returning concatenated files, but leaving them in the standard style.

// Styles
gulp.task('styles', function(){
  return sass('src/css/*.sass',{
    style: 'compressed'
  })
  .pipe(concatCss('style.css'))
  .on('error', errorLog)
  .pipe(autoprefixer({
    browsers: ['last 2 versions']
  }))
  .pipe(gulp.dest('build/css'))
  .pipe(browserSync.stream())
});
zhnoah commented 5 years ago

+1

I was also troubled by this question, When I use it to merge multiple compressed CSS files, It automatically formats the code.