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

Error when concatenating empty directory #22

Closed jme783 closed 9 years ago

jme783 commented 9 years ago

With the following code:

gulp.task('vendor-css', function() {
  gulp.src('./vendor/css/*.css')
    .pipe(concatCss('vendor.css'))
    .pipe(gulp.dest('./public/styles'));
});

And my vendor/css directory empty, I receive this error when trying to run the task:

TypeError: Cannot read property 'base' of undefined

I think the module requires that there are actually css files where you are telling it to concatenate. Ideally, it is flexible enough to skip the task if there are no CSS files present, and avoid throwing this error! For now, I'll put a placeholder CSS file there to avoid this.

Thanks!

mariocasciaro commented 9 years ago

Landed in 2.1.2. Thanks for reporting.

jme783 commented 9 years ago

:+1: