Zmiana aplikacji na wersje lang
This commit is contained in:
@@ -18,14 +18,22 @@ function publicAssetVersion(string $publicDir, string $relativePath): string
|
||||
}
|
||||
|
||||
/**
|
||||
* Najnowszy mtime wśród pliku głównego i wszystkich .js w katalogu modules/.
|
||||
* Najnowszy mtime wśród pliku głównego i wszystkich .js w katalogach modules/ i locales/.
|
||||
*/
|
||||
function publicJsBundleVersion(string $publicDir, string $entryRelativePath, string $modulesRelativeDir = 'assets/js/modules'): string
|
||||
function publicJsBundleVersion(string $publicDir, string $entryRelativePath): string
|
||||
{
|
||||
$versions = [(int) publicAssetVersion($publicDir, $entryRelativePath)];
|
||||
$modulesDir = $publicDir . DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, ltrim($modulesRelativeDir, '/'));
|
||||
$dirs = [
|
||||
'assets/js/modules',
|
||||
'assets/js/locales',
|
||||
];
|
||||
|
||||
foreach ($dirs as $relativeDir) {
|
||||
$modulesDir = $publicDir . DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, ltrim($relativeDir, '/'));
|
||||
if (!is_dir($modulesDir)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_dir($modulesDir)) {
|
||||
$iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($modulesDir, FilesystemIterator::SKIP_DOTS)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user