diff options
author | emkael <emkael@tlen.pl> | 2016-04-22 16:44:17 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-04-22 16:44:17 +0200 |
commit | f344237346e952cb052f690ff7732f2aab1f065f (patch) | |
tree | b02b468cd81b965293af8ac69ec990e702602f29 /app/php/components/ClientScriptManager.php | |
parent | ee96b029b7e5edc4ed6ddbfccf9df44b4c9e45e8 (diff) |
* JS minification on compilation
Diffstat (limited to 'app/php/components/ClientScriptManager.php')
-rw-r--r-- | app/php/components/ClientScriptManager.php | 11 |
1 files changed, 10 insertions, 1 deletions
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); } |