Skip to content

Commit

Permalink
feat(UiPublishCommand): publica o tabler na public
Browse files Browse the repository at this point in the history
  • Loading branch information
Milena Ramiro committed Feb 6, 2024
1 parent 9c9d13d commit f056efa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Console/Commands/UiPublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ class UiPublishCommand extends Command
{
protected $signature = 'admix:ui-publish';

protected $description = 'Publica os arquivos do admix-ui em public/vendor/admix-ui';
protected $description = 'Publica os arquivos do admix-ui em public/vendor/admix-ui ';

public function handle(): int
{
$this->line('');
$this->components->error('Implementar / Olhar o admix:install');
$this->components->info('Publicando os arquivos do admix');

$this->callSilent('vendor:publish', ['--tag' => 'admix-ui:assets', '--force' => true]);

$this->components->info('Arquivos publicados com sucesso.');

return static::SUCCESS;
}
Expand Down
8 changes: 8 additions & 0 deletions src/Providers/UiServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class UiServiceProvider extends ServiceProvider
public function boot(): void
{
$this->bootProviders();
$this->publish();
}

public function register(): void
Expand All @@ -22,4 +23,11 @@ public function bootProviders(): void
$this->app->register(CommandServiceProvider::class);
$this->app->register(RouteServiceProvider::class);
}

private function publish(): void
{
$this->publishes([
__DIR__ . '/../../tabler' => public_path('vendor/admix-ui/tabler'),
], 'admix-ui:assets');
}
}

0 comments on commit f056efa

Please sign in to comment.