server/lib/private/minimizer/js.php
Thomas Müller 9c9dc276b7 move the private namespace OC into lib/private - OCP will stay in lib/public
Conflicts:
	lib/private/vcategories.php
2013-09-30 16:36:59 +02:00

21 lines
496 B
PHP

<?php
require_once 'mediawiki/JavaScriptMinifier.php';
class OC_Minimizer_JS extends OC_Minimizer
{
protected $contentType = 'application/javascript';
public function minimizeFiles($files) {
$js_out = '';
foreach($files as $file_info) {
$file = $file_info[0] . '/' . $file_info[2];
$js_out .= '/* ' . $file . ' */' . "\n";
$js_out .= file_get_contents($file);
}
if (!defined('DEBUG') || !DEBUG) {
$js_out = JavaScriptMinifier::minify($js_out);
}
return $js_out;
}
}