1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-16 19:14:01 +02:00

Make Minify::combine and mix_extra stuff operational (and disabled by default)

This commit is contained in:
Steve Clay
2015-09-29 13:17:31 -04:00
parent f769e35233
commit a566536f80
4 changed files with 33 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
<?php
die('Must be rewritten for new API');
die('Disabled: use this only for testing');
require __DIR__ . '/../../bootstrap.php';
@@ -39,8 +39,13 @@ if (isset($_POST['method']) && $_POST['method'] === 'Minify and serve') {
}
$source = new Minify_Source($sourceSpec);
Minify_Logger::setLogger(FirePHP::getInstance(true));
$env = new Minify_Env();
$controller = new Minify_Controller_Files($env, new Minify_Source_Factory($env));
$minify = new Minify(new Minify_Cache_Null());
try {
Minify::serve('Files', array(
$minify->serve($controller, array(
'files' => $source
,'contentType' => Minify::TYPE_HTML
));
@@ -51,7 +56,7 @@ if (isset($_POST['method']) && $_POST['method'] === 'Minify and serve') {
}
$tpl = array();
$tpl['classes'] = array('Minify_HTML', 'JSMin\\JSMin', 'Minify_CSS', 'Minify_CSS');
$tpl['classes'] = array('Minify_HTML', 'JSMin\\JSMin', 'Minify_CSS');
if (isset($_POST['method']) && in_array($_POST['method'], $tpl['classes'])) {
@@ -113,6 +118,9 @@ function sendPage($vars) {
header('Content-Type: text/html; charset=utf-8');
?>
<!DOCTYPE html><head><title>minifyTextarea</title></head>
<p><strong>Warning! Please do not place this application on a public site.</strong> This should be used only for testing.</p>
<?php
if (isset($vars['exceptionMsg'])) {
echo $vars['exceptionMsg'];