Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (6 sloc) 515 Bytes

requires JSMin installed


$tpl = new TemplateOptimizer();
$tpl->someLocalVariable = true;

Right now, TemplateOptimizer saves compiled JS and CSS in the temp directory and serves cacheable, static files. Script and Link tags are placed at the end of the document (before the closing body tag) that reference these temp files. This requires an asset handler (like the one included) that mediates requests for these temp files by the client.