'regular', 'grip-dots' => 'custom', ]; $kitDir = dirname(__DIR__) . '/node_modules/@awesome.me/kit-ddaed3f5c5'; $kitSvgsDir = "$kitDir/icons/svgs"; $iconsDir = dirname(__DIR__) . '/src/icons'; $metaPath = "$kitDir/icons/metadata/icons.json"; $meta = json_decode(file_get_contents($metaPath), true); $index = []; $aliasesPhp = << $info) { if (isset($info['svg']['custom'])) { $style = 'custom'; } elseif (isset($info['svg']['brands'])) { $style = 'brands'; } else { $style = $styles[$name] ?? 'solid'; } $dir = match ($style) { 'custom' => 'custom-icons', default => $style, }; $iconPath = "$iconsDir/$dir/$name.svg"; echo "Writing $dir/$name.svg ... "; file_put_contents($iconPath, $info['svg'][$style]['raw']); echo "done\n"; $wrote++; if ($style !== 'custom') { $terms = $meta[$name]['search']['terms'] ?? []; $index[$name] = [ 'name' => sprintf(" %s ", Search::normalizeKeywords($name)), 'terms' => sprintf(" %s ", Search::normalizeKeywords($terms)), 'pro' => empty($meta[$name]['free']), 'styles' => $meta[$name]['styles'] ?? [], ]; } if ($style !== 'solid') { $aliasesPhp .= <<