helgesverre / blade-heroicons-upgrader
:package_description
Requires
- php: ^8.1
- illuminate/contracts: ^10.0|^11.0
- laravel/prompts: ^0.1.14
- spatie/laravel-package-tools: ^1.14.0
- spatie/regex: ^3.1.1
Requires (Dev)
- larastan/larastan: ^2.0.1
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- orchestra/testbench: ^8.8
- pestphp/pest: ^2.30
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-10-22 17:27:05 UTC
README
Blade Heroicons Upgrader
Storytime.
What it does.
This only supports Blade Heroicons.
🔧 Blade Heroicons Upgrader is a Laravel tool specifically designed for updating from Heroicons v1 to v2 in Blade files. It simplifies the process of transitioning to the latest Blade Heroicons version, making it quick and effortless.
This tool replaces old icon names in your code, such as @svg("clipboard-check")
and <x-clipboard-check />
, and
updates them to their new v2 equivalents such as @svg("clipboard-document-check")
and <x-clipboard-document-check />
.
It's built to prevent overlapping or incorrect updates, ensuring that icons are not mistakenly transformed into something
like <x-heroicon-o-server-stack-stack />
.
Installation
You can install the package via composer:
composer require --dev helgesverre/blade-heroicons-upgrader
Usage
Run the command to upgrade your blade files:
php artisan blade-heroicons-upgrader:upgrade
You may also specify one or more files or directories to run replacements on:
php artisan blade-heroicons-upgrader:upgrade ./resources/views ./app/Composers/MenuComposer.php
You can also do a dry run to see how many replacements in which files will be done.
php artisan blade-heroicons-upgrader:upgrade --dry
FAQ
Q: Does it work for other icon sets?
A: No, maybe in the future
Q: My icon was replaced with the wrong one. What should I do?
A: If you encounter any incorrect replacements, Please submit a pull
request with the correction. Your help in would be greatly appreciated!
Q: Why did you build this?
A: I had to do this process manually 4 times this year, and was tired of doing it.
License
The MIT License (MIT). Please see License File for more information.