jrit / web-resource-inliner

Inlines img, script and link tags into the same file
MIT License
66 stars 29 forks source link

new tests (43 total) incl external domains, encoding issues and separation local/external tests #41

Closed tommedema closed 2 years ago

tommedema commented 6 years ago

I have temporarily suspended work on web-source-inliner as it is costing me too much time and I need to move on with new tasks. I will come back to this project in the future though.

For now I would like to at least share my work. While it is complete it may not be easy for you to merge since I have combined several features in a single PR. Reason for this is that I had to build on top of previous work and couldn't wait for small PRs to be merged.

My suggestion would be for you to check the added tests, and then see how I resolved them. Most of the issues occur from the way resolving works. It's still not great to be honest, I expect that web-resource-inliner would be rebuilt from scratch, the way urls are resolved would be done differently.

For example, it doesn't make sense to try to rebase css when these css files may have relative root paths inside them (e.g. /css/main.css) while the css.js's scope is not aware of the root (base) domain. I have resolved this in this PR but it requires some conditional logic.

Feel free to merge or cherry-pick or let me know if you have questions.

jrit commented 6 years ago

Thanks @tommedema - I'll take a look soon and let you know if any of it is unclear to me.