1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-24 07:17:55 +01:00
openstamanager/app/Console/Commands/DevServerFix.php
Maicol Battistini 636c7ac68e
feat: 💥 Conversione a Typescript
- Rimossi Babel e Flow, sostituito con Typescript
- Qualche piccolo fix qua e là
- Aggiornate dipendenze
2022-01-06 15:45:35 +01:00

37 lines
839 B
PHP

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
class DevServerFix extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'osm:dev-server-fix';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Fix modules before starting the dev server';
/**
* Execute the console command.
*/
final public function handle(): int
{
foreach (glob(resource_path('static/vendor') . '/*/*/index.js', GLOB_NOSORT) as $file) {
$content = File::get($file);
File::put($file, str_replace('../../../index.js', '/resources/js/index.ts', $content));
}
return Command::SUCCESS;
}
}