diff options
author | Platonides <platonides@users.mediawiki.org> | 2011-01-28 17:51:46 +0000 |
---|---|---|
committer | Platonides <platonides@users.mediawiki.org> | 2011-01-28 17:51:46 +0000 |
commit | 9fb356f7eb3a3846efde3cc0a9d643d73c484cac (patch) | |
tree | 8ae6714754d199ab44ef2e595b2864dcd74b224e /maintenance/minify.php | |
parent | 56eee48fcf0aae558fc7a9cc79d41ced645cea73 (diff) | |
download | mediawikicore-9fb356f7eb3a3846efde3cc0a9d643d73c484cac.tar.gz mediawikicore-9fb356f7eb3a3846efde3cc0a9d643d73c484cac.zip |
JSMin is gone, please talk with JavaScriptDistiller
(r80656 follow up)
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/81141
Diffstat (limited to 'maintenance/minify.php')
-rw-r--r-- | maintenance/minify.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/maintenance/minify.php b/maintenance/minify.php index e56e634954d8..de9c53a960a2 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 ); |