Missing JavaScript minifier
ediamin opened this issue · 2 comments
ediamin commented
In order to minify HTML in PHP we need a PHP library that minifies JavaScript as well. We need to find a suitable PHP library and add that to our code.
Related to #14
swissspidy commented
I've used https://github.com/mck89/peast in the past to parse JS. Example formatting: https://github.com/mck89/peast/blob/master/doc/rendering.md#compact
schlessera commented
Using peast is a good idea! While having the code in the AST form, we could also safely make other modifications that might be needed, like renaming variables or so.
I'd just make peast an optional dependency then and enable modification of script when peast's presence is detected.