node packages removed

This commit is contained in:
Sevan Nerse 2021-12-27 15:07:36 +03:00
parent 0580b10452
commit 50b2149104

View File

@ -26,9 +26,7 @@ class Info
'laravel' => app()->version(),
'php' => static::phpVersion(),
'mysql' => static::mysqlVersion(),
'vuejs' => static::nodePackageVersion('vue'),
'livewire' => InstalledVersions::getPrettyVersion('livewire/livewire'),
'tailwindcss' => static::nodePackageVersion('tailwindcss'),
];
}
@ -56,16 +54,4 @@ class Info
return 'N/A';
}
public static function nodePackageVersion($package)
{
$version = '-';
$shell_exec_result = shell_exec('npm list ' . $package . ' --depth=0');
if (!strpos($shell_exec_result, '(empty)')) {
$version = trim(substr($shell_exec_result, strpos($shell_exec_result, $package . '@') + strlen($package) + 1));
}
return $version;
}
}