mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
39926fd747
@ -1 +1 @@
|
||||
5.8.40
|
||||
5.8.41
|
@ -42,35 +42,35 @@ class ReactBuilder extends Command
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$includes = '';
|
||||
// $includes = '';
|
||||
|
||||
$directoryIterator = false;
|
||||
// $directoryIterator = false;
|
||||
|
||||
try {
|
||||
$directoryIterator = new \RecursiveDirectoryIterator(public_path('react/v'.config('ninja.app_version').'/'), \RecursiveDirectoryIterator::SKIP_DOTS);
|
||||
} catch (\Exception $e) {
|
||||
$this->error('React files not found');
|
||||
return;
|
||||
}
|
||||
// try {
|
||||
// $directoryIterator = new \RecursiveDirectoryIterator(public_path('react/v'.config('ninja.app_version').'/'), \RecursiveDirectoryIterator::SKIP_DOTS);
|
||||
// } catch (\Exception $e) {
|
||||
// $this->error('React files not found');
|
||||
// return;
|
||||
// }
|
||||
|
||||
foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
|
||||
if ($file->getExtension() == 'js') {
|
||||
if (str_contains($file->getFileName(), 'index-')) {
|
||||
$includes .= '<script type="module" crossorigin src="/react/v'.config('ninja.app_version').'/'.$file->getFileName().'"></script>'."\n";
|
||||
} else {
|
||||
$includes .= '<link rel="modulepreload" href="/react/v'.config('ninja.app_version').'/'.$file->getFileName().'">'."\n";
|
||||
}
|
||||
}
|
||||
// foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
|
||||
// if ($file->getExtension() == 'js') {
|
||||
// if (str_contains($file->getFileName(), 'index-')) {
|
||||
// $includes .= '<script type="module" crossorigin src="/react/v'.config('ninja.app_version').'/'.$file->getFileName().'"></script>'."\n";
|
||||
// } else {
|
||||
// $includes .= '<link rel="modulepreload" href="/react/v'.config('ninja.app_version').'/'.$file->getFileName().'">'."\n";
|
||||
// }
|
||||
// }
|
||||
|
||||
if (str_contains($file->getFileName(), '.css')) {
|
||||
$includes .= '<link rel="stylesheet" href="/react/v'.config('ninja.app_version').'/'.$file->getFileName().'">'."\n";
|
||||
}
|
||||
}
|
||||
// if (str_contains($file->getFileName(), '.css')) {
|
||||
// $includes .= '<link rel="stylesheet" href="/react/v'.config('ninja.app_version').'/'.$file->getFileName().'">'."\n";
|
||||
// }
|
||||
// }
|
||||
|
||||
file_put_contents(resource_path('views/react/head.blade.php'), $includes);
|
||||
// file_put_contents(resource_path('views/react/head.blade.php'), $includes);
|
||||
}
|
||||
}
|
||||
|
@ -17,8 +17,8 @@ return [
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||
'app_version' => env('APP_VERSION', '5.8.40'),
|
||||
'app_tag' => env('APP_TAG', '5.8.40'),
|
||||
'app_version' => env('APP_VERSION', '5.8.41'),
|
||||
'app_tag' => env('APP_TAG', '5.8.41'),
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', false),
|
||||
|
Loading…
x
Reference in New Issue
Block a user