mathiasbynens / luamin

A Lua minifier written in JavaScript
https://mths.be/luamin
MIT License
217 stars 54 forks source link

Fix luamin binary in older Node versions. #8

Closed oxyc closed 11 years ago

oxyc commented 11 years ago

Readable was not introduced before Node v0.10 http://nodejs.org/api/stream.html#stream_compatibility

I haven't actually worked with streams so I have no idea if this is how it's supposed to be done, however it seems to work with v0.8.1 upwards.

oxyc commented 11 years ago

By the way I absolutely loved the piping, I'm doing it right now!

mathiasbynens commented 11 years ago

Merged in 107a38357ebbd24e2b19634dd5d0683c3ae76ead. Thanks!

mathiasbynens commented 11 years ago

Any plans to support piping to the luaparse binary?

oxyc commented 11 years ago

Definitely! However, I just noticed this implementation does not work in node 0.9.4-0.9.11.

I'm guessing https://github.com/joyent/node/pull/4901 is related but I can't figure out how to make it work. I'll look into it tomorrow though, unless you've found a solution by then.