jstuckey / gulp-gzip

Gzip plugin for gulp.
MIT License
175 stars 17 forks source link

Option to skip files that get larger after compression #21

Closed jstuckey closed 8 years ago

jstuckey commented 8 years ago

Addresses issue https://github.com/jstuckey/gulp-gzip/issues/19 raised by @dstufft.

Some files get larger after being compressed by gzip. Provide an option to pass along the original, uncompressed file if compression increases the file size. Disabled by default for backwards compatibility.

jstuckey commented 8 years ago

Hey, @dstufft. Please let me know if you have any feedback on this. I’m not thrilled with the name of this option, so I’m open to suggestions.

Also, sorry this took so long, but life has been a little crazy lately.

dstufft commented 8 years ago

Javascript isn't my main language so I don't have a whole lot to say about the code itself (sorry!) but a big +1 on this feature. I agree the name is less than great though I'm not thinking of anything off the top of my head that is a good replacement for it.

The one suggestion I might have, but I don't know if you consider it to be backwards compatible or not, is defaulting this to true rather than false. It feels like to me that most people are going to (or should) prefer to have this on, but I might be the weirdo in wanting this.

And there's no need to apologize, it's all OSS and regular life has to come first. Thanks a lot for implementing it! I look forward to using it.

jstuckey commented 8 years ago

I agree that this option is something people might prefer to have on, but defaulting to true would change the expected behavior for existing users. Basically I want to avoid this scenario:

dstufft commented 8 years ago

Makes sense.