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

Imported files saved with original path included #41

Closed Omranic closed 7 years ago

Omranic commented 7 years ago

I'm just wondering why this package save files with their original path included?!

Usage

var gulp = require('gulp');
var concatCss = require('gulp-concat-css');

gulp.task('default', function () {
  return gulp.src('assets/css/app.css')
    .pipe(concatCss("styles/bundle.css"))
    .pipe(gulp.dest('out/'));
});

Expected

out/styles/bundle.css

Current

out/assets/css/styles/bundle.css

And I can see it's intentional and can't be overridden by options, don't you think this needs to be flexible? https://github.com/mariocasciaro/gulp-concat-css/blob/master/index.js#L120

mariocasciaro commented 7 years ago

You need to set the right base for gulp.src:

gulp.src([...your assets...], {base: 'assets'})