Remove JSMinifier implementation

This commit is contained in:
Aaron Carlino 2017-05-11 10:17:54 +12:00
parent 7fa47e234f
commit 5b46461879
2 changed files with 832 additions and 863 deletions

View File

@ -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";
}
}
}

View File

@ -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;