-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corrupts binary files (non-unicode files) #71
Comments
To be more specific, corrupts non-unicode files. |
cc @floridoo I'm pretty sure I talked about this when the sourcemaps stuff was first proposed - I wanted to make sure that it didn't break binary files |
@contra this is not a problem with file.contents !== new Buffer(file.contents.toString()) for binary files. |
@floridoo does concat-with-sourcemaps take in a buffer as an argument? The problem is right here where we convert to a string before passing it https://github.com/wearefractal/gulp-concat/blob/master/index.js#L35 |
@contra currently not, but I can look int adding that feature. |
@floridoo I can't think of any in my day to day but it isn't just binary, it could be any file in another encoding that isn't utf8. I 100% think we should support this. I think concat-with-sourcemaps just needs to use Buffer and Buffer.concat instead of strings and += |
@floridoo If a file has no sourceMap then it should basically revert to the pre-sourcemaps behavior |
Use cases I'm aware of are node-webkit and love2d. They use concatenation of binary interpreter with zipped application source to ease distribution on certain platforms. |
Hi i'm using node-webkit and i'm having this issue. Is there any solution? Thanks. |
@martinib77, my current workaround is to stick with 2.2.0. |
Put @floridoo Alive? |
That worked, thanks! |
@contra I'm fine, just very busy ;) |
Don't corrupt binary files (fixes #71)
Published as 2.4.3 |
👍 |
Resulting
gulpfile.zip
is corrupted. Withconcat
line commented out everything works as expected.gulp-concat v2.4.2, gulp v3.8.10, node v0.10.31
The text was updated successfully, but these errors were encountered: