Remove obsolete scripts/generatecss.php

Clearly broken, as it tries to include a non-existing Resources.php file.

Also it's pretending to be MediaWiki 1.23, which is plenty old.

It was supposed to be run via the Makefile, but that's been broken since at
least 111b671444. If this functionality of identifying duplicate CSS rules
is still wanted, I'm sure there's a better way to do it than with a hacky PHP
script and a ruby tool.

Mainly removed since it's causing a phan-taint-check-plugin warning (T202383).

Change-Id: Id1d117f41f93adec4bba7191843aa415c4049d5f
This commit is contained in:
Kunal Mehta 2018-09-09 17:04:21 -07:00
parent 1c51a034c5
commit a7cf20d9fe
2 changed files with 0 additions and 41 deletions

View file

@ -47,12 +47,6 @@ jshint: nodecheck
checkless: checkless:
@${PHP} ../../maintenance/checkLess.php @${PHP} ../../maintenance/checkLess.php
# Check compiled less files for duplicated rules
csscss: gems
echo "Generating CSS file..."
php scripts/generatecss.php ${MEDIAWIKI_LOAD_URL} /tmp/foo.css
csscss -v /tmp/foo.css --num 2 --no-match-shorthand --ignore-properties=display,position,top,bottom,left,right
### ###
# Testing # Testing
### ###
@ -61,10 +55,3 @@ test: phpunit
# Run the projects phpunit tests # Run the projects phpunit tests
phpunit: phpunit:
cd ${MW_INSTALL_PATH}/tests/phpunit && ${PHP} phpunit.php --configuration ${MW_INSTALL_PATH}/extensions/Echo/tests/echo.suite.xml --group=Echo cd ${MW_INSTALL_PATH}/tests/phpunit && ${PHP} phpunit.php --configuration ${MW_INSTALL_PATH}/extensions/Echo/tests/echo.suite.xml --group=Echo
###
# Update this repository for csscss dependencies
###
gems:
bundle install

View file

@ -1,28 +0,0 @@
<?php
if ( count( $argv ) < 3 ) {
print "Call with 2 arguments: the path to the load url and the file to output to";
exit();
}
$loadUrl = $argv[1];
$outputFile = $argv[2];
define( 'MEDIAWIKI', true );
const NS_MAIN = 0;
$wgVersion = 1.23;
$wgSpecialPages = [];
$wgResourceModules = [];
include "Resources.php";
$query = [];
$blacklist = [];
foreach ( $wgResourceModules as $moduleName => $def ) {
if ( !in_array( $moduleName, $blacklist ) ) {
$query[] = $moduleName;
}
}
$url = $loadUrl . '?only=styles&skin=vector&modules=' . implode( '|', $query );
echo $url;
$css = file_get_contents( $url );
file_put_contents( $outputFile, $css );