configured plugin

This commit is contained in:
DigitalInfinity committed 2025-11-09 19:18:07 +00:00
1 parent 2b156878ad
commit 400cee47fc
28 files changed
+104 -523

No files matched your search

@@ -1,12 +1,12 @@
<?php
namespace VendorName\Skeleton\Commands;
namespace AlexanderGabriel\FilamentOauth2\Commands;
use Illuminate\Console\Command;
class SkeletonCommand extends Command
class FilamentOauth2Command extends Command
{
public $signature = 'skeleton';
public $signature = 'filament-oauth2';
public $description = 'My command';
+16
View File
@@ -0,0 +1,16 @@
<?php
namespace AlexanderGabriel\FilamentOauth2\Facades;
use Illuminate\Support\Facades\Facade;
/**
* @see \AlexanderGabriel\FilamentOauth2\FilamentOauth2
*/
class FilamentOauth2 extends Facade
{
protected static function getFacadeAccessor()
{
return \AlexanderGabriel\FilamentOauth2\FilamentOauth2::class;
}
}
-16
View File
@@ -1,16 +0,0 @@
<?php
namespace VendorName\Skeleton\Facades;
use Illuminate\Support\Facades\Facade;
/**
* @see \VendorName\Skeleton\Skeleton
*/
class Skeleton extends Facade
{
protected static function getFacadeAccessor()
{
return \VendorName\Skeleton\Skeleton::class;
}
}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace AlexanderGabriel\FilamentOauth2;
class FilamentOauth2 {}
@@ -1,15 +1,15 @@
<?php
namespace VendorName\Skeleton;
namespace AlexanderGabriel\FilamentOauth2;
use Filament\Contracts\Plugin;
use Filament\Panel;
class SkeletonPlugin implements Plugin
class FilamentOauth2Plugin implements Plugin
{
public function getId(): string
{
return 'skeleton';
return 'filament-oauth2';
}
public function register(Panel $panel): void
@@ -1,6 +1,6 @@
<?php
namespace VendorName\Skeleton;
namespace AlexanderGabriel\FilamentOauth2;
use Filament\Support\Assets\AlpineComponent;
use Filament\Support\Assets\Asset;
@@ -13,14 +13,14 @@ use Livewire\Features\SupportTesting\Testable;
use Spatie\LaravelPackageTools\Commands\InstallCommand;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use VendorName\Skeleton\Commands\SkeletonCommand;
use VendorName\Skeleton\Testing\TestsSkeleton;
use AlexanderGabriel\FilamentOauth2\Commands\FilamentOauth2Command;
use AlexanderGabriel\FilamentOauth2\Testing\TestsFilamentOauth2;
class SkeletonServiceProvider extends PackageServiceProvider
class FilamentOauth2ServiceProvider extends PackageServiceProvider
{
public static string $name = 'skeleton';
public static string $name = 'filament-oauth2';
public static string $viewNamespace = 'skeleton';
public static string $viewNamespace = 'filament-oauth2';
public function configurePackage(Package $package): void
{
@@ -36,7 +36,7 @@ class SkeletonServiceProvider extends PackageServiceProvider
->publishConfigFile()
->publishMigrations()
->askToRunMigrations()
->askToStarRepoOnGitHub(':vendor_slug/:package_slug');
->askToStarRepoOnGitHub('alexandergabriel/filament-oauth2');
});
$configFileName = $package->shortName();
@@ -80,18 +80,18 @@ class SkeletonServiceProvider extends PackageServiceProvider
if (app()->runningInConsole()) {
foreach (app(Filesystem::class)->files(__DIR__ . '/../stubs/') as $file) {
$this->publishes([
$file->getRealPath() => base_path("stubs/skeleton/{$file->getFilename()}"),
], 'skeleton-stubs');
$file->getRealPath() => base_path("stubs/filament-oauth2/{$file->getFilename()}"),
], 'filament-oauth2-stubs');
}
}
// Testing
Testable::mixin(new TestsSkeleton);
Testable::mixin(new TestsFilamentOauth2);
}
protected function getAssetPackageName(): ?string
{
return ':vendor_slug/:package_slug';
return 'alexandergabriel/filament-oauth2';
}
/**
@@ -100,9 +100,9 @@ class SkeletonServiceProvider extends PackageServiceProvider
protected function getAssets(): array
{
return [
// AlpineComponent::make('skeleton', __DIR__ . '/../resources/dist/components/skeleton.js'),
Css::make('skeleton-styles', __DIR__ . '/../resources/dist/skeleton.css'),
Js::make('skeleton-scripts', __DIR__ . '/../resources/dist/skeleton.js'),
// AlpineComponent::make('filament-oauth2', __DIR__ . '/../resources/dist/components/filament-oauth2.js'),
Css::make('filament-oauth2-styles', __DIR__ . '/../resources/dist/filament-oauth2.css'),
Js::make('filament-oauth2-scripts', __DIR__ . '/../resources/dist/filament-oauth2.js'),
];
}
@@ -112,7 +112,7 @@ class SkeletonServiceProvider extends PackageServiceProvider
protected function getCommands(): array
{
return [
SkeletonCommand::class,
FilamentOauth2Command::class,
];
}
@@ -146,7 +146,7 @@ class SkeletonServiceProvider extends PackageServiceProvider
protected function getMigrations(): array
{
return [
'create_skeleton_table',
'create_filament-oauth2_table',
];
}
}
-5
View File
@@ -1,5 +0,0 @@
<?php
namespace VendorName\Skeleton;
class Skeleton {}
-39
View File
@@ -1,39 +0,0 @@
<?php
namespace VendorName\Skeleton;
use Filament\Contracts\Plugin;
use Filament\Panel;
use Filament\Support\Assets\Theme;
use Filament\Support\Color;
use Filament\Support\Facades\FilamentAsset;
class Skeleton implements Plugin
{
public function getId(): string
{
return 'skeleton';
}
public function register(Panel $panel): void
{
FilamentAsset::register([
Theme::make('skeleton', __DIR__ . '/../resources/dist/skeleton.css'),
]);
$panel
->font('DM Sans')
->primaryColor(Color::Amber)
->secondaryColor(Color::Gray)
->warningColor(Color::Amber)
->dangerColor(Color::Rose)
->successColor(Color::Green)
->grayColor(Color::Gray)
->theme('skeleton');
}
public function boot(Panel $panel): void
{
//
}
}
@@ -1,13 +1,13 @@
<?php
namespace VendorName\Skeleton\Testing;
namespace AlexanderGabriel\FilamentOauth2\Testing;
use Livewire\Features\SupportTesting\Testable;
/**
* @mixin Testable
*/
class TestsSkeleton
class TestsFilamentOauth2
{
//
}