Takes a php template, strips all inline and block js/css, compresses html, optionally compresses and serves pulled js/css as cached(static) assets
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README
README.md
TemplateOptimizer.php
cachedAssets.php

README.md

requires JSMin installed

use:

$tpl = new TemplateOptimizer();
$tpl->someLocalVariable = true;
$tpl->display('templates/someTemplate.php',[$compress(bool)]);

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.