Manual:Minify.php/pl

Category:MediaWiki deprecated or obsolete features/pl#Minify.php
Wersja MediaWiki:
1.35
Category:MediaWiki code/pl#Minify.php

Szczegóły

Minify.php file is a maintenance script that minifies a file or set of files.

This script has been removed in Gerrit change 663099 (MediaWiki 1.36) as minification has moved to its own library: Minify. See T273247.

Opcje

Opcja Opis Wymagane
fileInput file. Use - to read from standard input.Wymagane
--outfileWrite minified output to this file (instead of standard out).Optional
--typeOverride the input type (one of "js" or "css"). Defaults to file extension. Required if reading from standard input.Optional

If multiple input files are given, they will be concatenated.

Usage

php maintenance/minify.php filename|- [ --outfile| --type ]
testcode.js
// Long list into two col
$( document ).ready( function(){

	var longList = $("#longList").addClass("grid_row"),
		dlElements = longList.children().filter("dl"),
		dlElementsLength = dlElements.length;
	
	var list1 = [],
		list2 = [];
	
	var count = 0;
	dlElements.each( function(index, ele){
		if( count < dlElementsLength/2 ){
			list1.push(ele);
			list1.push( $(ele).next() );
		} else {
			list2.push(ele);
			list2.push( $(ele).next() );
		}
		count = count + 1;
	});
	
	longList.empty();
	
	var leftDiv = $("<div/>").addClass("grid_col");
	list1.forEach( function(value, index){
		leftDiv.append(value);
	});
	
	
	var rightDiv = $("<div/>").addClass("grid_col");
	list2.forEach( function(value, index){
		rightDiv.append(value);
	});
	
	longList.append(leftDiv, rightDiv );
	
});
Terminal

Zobacz też

Category:Maintenance scripts/pl Category:Development maintenance scripts/pl
Category:Development maintenance scripts/pl Category:Maintenance scripts/pl Category:MediaWiki code/pl Category:MediaWiki deprecated or obsolete features/pl