1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 13:28:35 +01:00
php-debugbar/build/namespaceFontAwesome.php
2015-12-10 10:34:30 +01:00

20 lines
534 B
PHP

<?php
$path = __DIR__ . '/../src/DebugBar/Resources/vendor/font-awesome/css/font-awesome.min.css';
$contents = file_get_contents($path);
if (strpos($contents, 'PhpDebugbarFontAwesome') !== false ){
exit('Already namespaced');
}
// namespace FontAwesome occurrences
$contents = str_replace(['FontAwesome', 'fa-', '.fa'], ['PhpDebugbarFontAwesome', 'phpdebugbar-fa-', '.phpdebugbar-fa'], $contents);
if (file_put_contents($path, $contents)) {
echo "Updated font-awesome.min.css";
} else {
echo "No content written";
}