AutoMin
AutoMin copied to clipboard
Enables support for {stylesheet} and {path} linked templates.
But it does dumb down some of your file path checks and such.
This probably will only reliably work with {stylesheet} because {path} doesn't tack on a timestamp on it's own so automin doesn't know the modified date as far as I know (also the regex would have to be modified again to support {path} for anything other than css/less).
This also suppressed the division by warning here.
This last commit I made I took the time to read the template edit_date from exp_templates and tack on the ?modified= properly like you do so you don't end up with a jazillion files.
It's pretty clean for the most part. I haven't tested it with any less templates but I tried with both js & css it seemed to work. Things might get a little hairy if people try to use the {path} variable for regular files but this was an issue before I came along because the tag_data was not sent though parse_global_variables :)
I still don't quite understand the is_readable / file_exists lines here and I hope what I came up with as a replacement is okay.
Cheers!
Hey Chris, thanks a lot for all of this. Give me a few days to review it and if I find no issues, I'll merge.
Is this merged in?
It isn't but I just copied the edits from Chris into my copy and it worked perfectly.
Very nice work, this extension is massively important to me as I need to use Less, Bootstrap and Font Awesome in my EE install and this seems to be the only solution to the issues (It also compiles the latest bootstrap less too!).