gulp-community / gulp-concat

Streaming concat middleware for gulp
MIT License
792 stars 126 forks source link

Duplicate contents in minified file #110

Closed riyasat closed 8 years ago

riyasat commented 8 years ago

Hi, I am testing MVC6 and tried gulp-concat in gulpfile.js. It worked pretty fine but has one problem I do not know if it's only me or someone else is also having that. The issue is it concatenate same file twice. I added following code under

var cssMinify = require('gulp-minify-css'); var concat = require('gulp-concat');

gulp.task('minifycss', function () { gulp.src('./wwwroot/lib/font-awesome/font-awesome.css') .pipe(cssMinify()) .pipe(concat("fontawesome-min.css")) .pipe(gulp.dest('./wwwroot/app/font-awesome'); }

Now the out put should be one minified file of font awesome which is working fine but when I look into the file content it display gulp-concat-error

Can you please take a look what is happening.

Thanks.

yocontra commented 8 years ago

Why are you using concat at all if you only have one file?

yocontra commented 8 years ago

We have a test that verifies the correct behavior for this, you probably have an issue somewhere else in your code.

Test: https://github.com/contra/gulp-concat/blob/master/test/main.js#L58-L64