v1.0.0 initial release
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace BladeUI\Icons\Console;
|
||||
|
||||
use BladeUI\Icons\Factory;
|
||||
use BladeUI\Icons\IconsManifest;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
final class CacheCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'icons:cache';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Discover icon sets and generate a manifest file';
|
||||
|
||||
public function handle(Factory $factory, IconsManifest $manifest): int
|
||||
{
|
||||
$manifest->write($factory->all());
|
||||
|
||||
$this->info('Blade icons manifest file generated successfully!');
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace BladeUI\Icons\Console;
|
||||
|
||||
use BladeUI\Icons\IconsManifest;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
final class ClearCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'icons:clear';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Remove the blade icons manifest file';
|
||||
|
||||
public function handle(IconsManifest $manifest): int
|
||||
{
|
||||
$manifest->delete();
|
||||
|
||||
$this->info('Blade icons manifest file cleared!');
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user