Auto-minify CSS/JS: dev mode deletes .min, prod mode regenerates
- helper/minify.php: PHP-based CSS/JS minifier with timestamp caching - Dev mode ON: deletes all .min.css and .min.js files - Dev mode OFF: regenerates .min files from source if stale or missing - Covers template.css, light/dark standard/custom theme CSS, template.js - No external build tools needed — template is self-contained Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,10 @@ if ($params_favicon_source) {
|
||||
}
|
||||
}
|
||||
|
||||
// Minification: dev mode ON → delete .min files; OFF → regenerate if stale
|
||||
require_once __DIR__ . '/helper/minify.php';
|
||||
MokoMinifyHelper::sync(JPATH_ROOT . '/' . $templatePath, (bool) $params_developmentmode);
|
||||
|
||||
// Core template CSS + JS — use minified when not in development mode
|
||||
if ($params_developmentmode) {
|
||||
$wa->useStyle('template.base'); // css/template.css
|
||||
|
||||
Reference in New Issue
Block a user