r81141 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81140‎ | r81141 | r81142 >
Date:17:51, 28 January 2011
Author:platonides
Status:ok
Tags:
Comment:
JSMin is gone, please talk with JavaScriptDistiller
(r80656 follow up)
Modified paths:
  • /trunk/phase3/maintenance/minify.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/minify.php
@@ -35,6 +35,9 @@
3636 "Directory for output. If this is not specified, and neither is --outfile, then the\n" .
3737 "output files will be sent to the same directories as the input files.",
3838 false, true );
 39+ $this->addOption( 'minify-vertical-space',
 40+ "Boolean value for minifying the vertical space for javascript.",
 41+ false, true );
3942 $this->mDescription = "Minify a file or set of files.\n\n" .
4043 "If --outfile is not specified, then the output file names will have a .min extension\n" .
4144 "added, e.g. jquery.js -> jquery.min.js.";
@@ -96,6 +99,8 @@
97100 }
98101
99102 public function minify( $inPath, $outPath ) {
 103+ global $wgResourceLoaderMinifyJSVerticalSpace;
 104+
100105 $extension = $this->getExtension( $inPath );
101106 $this->output( basename( $inPath ) . ' -> ' . basename( $outPath ) . '...' );
102107
@@ -112,7 +117,7 @@
113118
114119 switch ( $extension ) {
115120 case 'js':
116 - $outText = JSMin::minify( $inText );
 121+ $outText = JavaScriptDistiller::stripWhiteSpace( $inText, $this->getOption( 'minify-vertical-space', $wgResourceLoaderMinifyJSVerticalSpace ) );
117122 break;
118123 case 'css':
119124 $outText = CSSMin::minify( $inText );

Follow-up revisions

RevisionCommit summaryAuthorDate
r814021.17: MFT r79915, r79957, r79964, r79990, r80687, r80999, r81006, r81011, r81...catrope16:18, 2 February 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80656Resolved bug 26791 by replacing JSMin with a new library called JavaScriptDis...tparscal21:57, 20 January 2011

Status & tagging log