minifyify
minifyify copied to clipboard
forward writeStream errors to minifiedStream
In situations where the writeStream cannot write to the sourcemap file (such as when it doesn't have permissions), the entire process crashes. This will forward error events to the minifiedStream, so the user can handle them as needed.
I was going to write a test for this, but since git doesn't retain file permissions, I'm not sure of the best way to test this. @ben-ng if you have any feedback on how you think this could be tested, I'd be happy to write tests
I think you can test this by changing the file permissions in the test with fs.chmod
.