ampproject/amp-toolbox-php

Missing JavaScript minifier

ediamin opened this issue · 2 comments

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

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.