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

Version number in JS filename not supported #75

Closed tmanaud closed 8 years ago

tmanaud commented 8 years ago

Just found this issue: In the input html file, if I use: script type="text/javascript" src="jquery-mobile/jquery.mobile-1.4.5.min.js"></script

then the result is: script type="text/javascript" src="jquery-mobile/jquery.mobile-1.4.5.min.js"></script

But if I rename the "jquery.mobile-1.4.5.min.js" to "jquery.mobile.js" and change my input html to: script type="text/javascript" src="jquery-mobile/jquery.mobile.js"></script

the result is correctly inlined: script type="text/javascript">!function(e,t,i){"function"==typeof define&&define.amd?define(["jquery"],function(n){return i(n,e,t),n.mobile}):i(e.jQuery,e,t)}......."

I do note that same version number for CSS or other ressources dont cause any trouble: link rel="stylesheet" type="text/css" href="jquery-mobile/jquery.mobile-1.4.5.min.css" /

Thanks in advance for looking into this.

remy commented 8 years ago

Pre-minified scripts aren't minified inline by default.

I need to merge this in for support: https://github.com/remy/inliner/pull/67

tmanaud commented 8 years ago

Perfect, tested and everything looks fine with the new flag. Thanks a lot,