mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Remove JSMinifier implementation
This commit is contained in:
parent
7fa47e234f
commit
5b46461879
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\View;
|
||||
|
||||
use Exception;
|
||||
use JSMin;
|
||||
|
||||
class JSMinifier implements Requirements_Minifier
|
||||
{
|
||||
|
||||
public function minify($content, $type, $filename)
|
||||
{
|
||||
// Non-js files aren't minified
|
||||
if ($type !== 'js') {
|
||||
return $content . "\n";
|
||||
}
|
||||
|
||||
// Combine JS
|
||||
try {
|
||||
require_once('jsmin/jsmin.php');
|
||||
increase_time_limit_to();
|
||||
$content = JSMin::minify($content);
|
||||
} catch (Exception $e) {
|
||||
$message = $e->getMessage();
|
||||
user_error("Failed to minify {$filename}, exception: {$message}", E_USER_WARNING);
|
||||
} finally {
|
||||
return $content . ";\n";
|
||||
}
|
||||
}
|
||||
}
|
@ -8,7 +8,6 @@ use SilverStripe\Control\ContentNegotiator;
|
||||
use SilverStripe\Control\HTTPResponse;
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\Core\Injector\Injector;
|
||||
use SilverStripe\Dev\Debug;
|
||||
use SilverStripe\Dev\SapphireTest;
|
||||
use SilverStripe\i18n\i18n;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
|
Loading…
Reference in New Issue
Block a user