From 9fb356f7eb3a3846efde3cc0a9d643d73c484cac Mon Sep 17 00:00:00 2001 From: Platonides Date: Fri, 28 Jan 2011 17:51:46 +0000 Subject: [PATCH] JSMin is gone, please talk with JavaScriptDistiller (r80656 follow up) --- maintenance/minify.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/maintenance/minify.php b/maintenance/minify.php index e56e634954..de9c53a960 100644 --- a/maintenance/minify.php +++ b/maintenance/minify.php @@ -35,6 +35,9 @@ class MinifyScript extends Maintenance { "Directory for output. If this is not specified, and neither is --outfile, then the\n" . "output files will be sent to the same directories as the input files.", false, true ); + $this->addOption( 'minify-vertical-space', + "Boolean value for minifying the vertical space for javascript.", + false, true ); $this->mDescription = "Minify a file or set of files.\n\n" . "If --outfile is not specified, then the output file names will have a .min extension\n" . "added, e.g. jquery.js -> jquery.min.js."; @@ -96,6 +99,8 @@ class MinifyScript extends Maintenance { } public function minify( $inPath, $outPath ) { + global $wgResourceLoaderMinifyJSVerticalSpace; + $extension = $this->getExtension( $inPath ); $this->output( basename( $inPath ) . ' -> ' . basename( $outPath ) . '...' ); @@ -112,7 +117,7 @@ class MinifyScript extends Maintenance { switch ( $extension ) { case 'js': - $outText = JSMin::minify( $inText ); + $outText = JavaScriptDistiller::stripWhiteSpace( $inText, $this->getOption( 'minify-vertical-space', $wgResourceLoaderMinifyJSVerticalSpace ) ); break; case 'css': $outText = CSSMin::minify( $inText ); -- 2.20.1