From f344237346e952cb052f690ff7732f2aab1f065f Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 22 Apr 2016 16:44:17 +0200 Subject: * JS minification on compilation --- app/php/components/ClientScriptManager.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/php/components/ClientScriptManager.php b/app/php/components/ClientScriptManager.php index cd948a6..84b9d6f 100644 --- a/app/php/components/ClientScriptManager.php +++ b/app/php/components/ClientScriptManager.php @@ -120,7 +120,16 @@ class ClientScriptManager extends TClientScriptManager { < $this->_getFileCollectionMTime($paths))) { $scriptContent = implode( PHP_EOL, - array_map('file_get_contents', $paths) + array_map( + function($path) { + return trim( + TJavaScript::JSMin( + file_get_contents($path) + ) + ); + }, + $paths + ) ); file_put_contents($cacheFile, $scriptContent); } -- cgit v1.2.3