mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-23 10:22:05 +00:00
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:
parent
1c51a034c5
commit
a7cf20d9fe
13
Makefile
13
Makefile
|
@ -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
|
|
||||||
|
|
||||||
|
|
|
@ -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 );
|
|
Loading…
Reference in a new issue