remy / inliner

Node utility to inline images, CSS and JavaScript for a web page - useful for mobile sites
MIT License
1.1k stars 165 forks source link

Leave existing data:uris as is and don't recompress compressed js #3

Closed krawaller closed 13 years ago

krawaller commented 13 years ago

Hi Remy!

We wanted to use your inliner tool, and stumbled upon these shortcomings, so we threw together some fixes. Merge if you like what you see.

Btw, your tool might be a quick weekend hack, but it delivers good value already. Keep em comin!

Cheers

remy commented 13 years ago

Just waiting on the response to the two questions I raised, then I'll pull this change it - cheers for the contribution :)

krawaller commented 13 years ago

Hey!

  1. I left the src attribute only until the scriptsFinished function to be able to do the minification check, and then remove it there instead. Refactor the way you see fit :)
  2. Agreed! I don't think I changed that part of the logic, so it should still work if it did before. I just don't mangle and squeeze the code with UglifyJS.

Sorry for the confusion - this was my first pull request, and you're an idol, so I might've got carried away ;)

Cheers!

remy commented 13 years ago

Sorry I've been slack pulling this change in - I do intend to. I want to pull it in and check out changes myself. It looks fine now looking at it with fresh eyes - just need to pull, merge, and publish it back through npm.

Cheers :)