Fix styling

This commit is contained in:
awcodes
2022-12-09 18:24:20 +00:00
committed by github-actions[bot]
parent fbb2fa6aea
commit cff55a6ba4
4 changed files with 41 additions and 38 deletions

View File

@@ -83,25 +83,25 @@ if ($formsOnly) {
]); ]);
} else { } else {
if ($isTheme) { if ($isTheme) {
copy(__DIR__ . '/configure-stubs/theme/package.json', __DIR__ . '/package.json'); copy(__DIR__.'/configure-stubs/theme/package.json', __DIR__.'/package.json');
copy(__DIR__ . '/configure-stubs/theme/plugin.css', __DIR__ . '/resources/css/plugin.css'); copy(__DIR__.'/configure-stubs/theme/plugin.css', __DIR__.'/resources/css/plugin.css');
copy(__DIR__ . '/configure-stubs/theme/tailwind.config.js', __DIR__ . '/tailwind.config.js'); copy(__DIR__.'/configure-stubs/theme/tailwind.config.js', __DIR__.'/tailwind.config.js');
safeUnlink(__DIR__ . '/src/SkeletonServiceProvider.php'); safeUnlink(__DIR__.'/src/SkeletonServiceProvider.php');
safeUnlink(__DIR__ . '/src/Skeleton.php'); safeUnlink(__DIR__.'/src/Skeleton.php');
removeDirectory(__DIR__ . '/config'); removeDirectory(__DIR__.'/config');
removeDirectory(__DIR__ . '/database'); removeDirectory(__DIR__.'/database');
removeDirectory(__DIR__ . '/stubs'); removeDirectory(__DIR__.'/stubs');
removeDirectory(__DIR__ . '/resources/js'); removeDirectory(__DIR__.'/resources/js');
removeDirectory(__DIR__ . '/resources/lang'); removeDirectory(__DIR__.'/resources/lang');
removeDirectory(__DIR__ . '/resources/views'); removeDirectory(__DIR__.'/resources/views');
removeDirectory(__DIR__ . '/src/Commands'); removeDirectory(__DIR__.'/src/Commands');
removeDirectory(__DIR__ . '/src/Facades'); removeDirectory(__DIR__.'/src/Facades');
removeDirectory(__DIR__ . '/src/Testing'); removeDirectory(__DIR__.'/src/Testing');
} else { } else {
safeUnlink(__DIR__ . '/src/SkeletonTheme.php'); safeUnlink(__DIR__.'/src/SkeletonTheme.php');
copy(__DIR__ . '/configure-stubs/package/package.json', __DIR__ . '/package.json'); copy(__DIR__.'/configure-stubs/package/package.json', __DIR__.'/package.json');
copy(__DIR__ . '/configure-stubs/package/plugin.css', __DIR__ . '/resources/css/plugin.css'); copy(__DIR__.'/configure-stubs/package/plugin.css', __DIR__.'/resources/css/plugin.css');
copy(__DIR__ . '/configure-stubs/package/tailwind.config.js', __DIR__ . '/tailwind.config.js'); copy(__DIR__.'/configure-stubs/package/tailwind.config.js', __DIR__.'/tailwind.config.js');
} }
remove_composer_filament_deps([ remove_composer_filament_deps([
@@ -186,7 +186,7 @@ if (! $useUpdateChangelogWorkflow) {
confirm('Execute `composer install` and run tests?') && run('composer install && composer test'); confirm('Execute `composer install` and run tests?') && run('composer install && composer test');
if (confirm('Let this script delete itself?', true)) { if (confirm('Let this script delete itself?', true)) {
removeDirectory(__DIR__ . '/configure-stubs'); removeDirectory(__DIR__.'/configure-stubs');
unlink(__FILE__); unlink(__FILE__);
} }
@@ -377,12 +377,17 @@ function replaceForAllOtherOSes(): array
return explode(PHP_EOL, run('grep -E -r -l -i ":author|:vendor|:package|VendorName|skeleton|vendor_name|vendor_slug|author@domain.com" --exclude-dir=vendor ./* ./.github/* | grep -v '.basename(__FILE__))); return explode(PHP_EOL, run('grep -E -r -l -i ":author|:vendor|:package|VendorName|skeleton|vendor_name|vendor_slug|author@domain.com" --exclude-dir=vendor ./* ./.github/* | grep -v '.basename(__FILE__)));
} }
function removeDirectory($dir): void { function removeDirectory($dir): void
{
if (is_dir($dir)) { if (is_dir($dir)) {
$objects = scandir($dir); $objects = scandir($dir);
foreach ($objects as $object) { foreach ($objects as $object) {
if ($object != "." && $object != "..") { if ($object != '.' && $object != '..') {
if (filetype($dir."/".$object) == "dir") removeDirectory($dir."/".$object); else unlink($dir."/".$object); if (filetype($dir.'/'.$object) == 'dir') {
removeDirectory($dir.'/'.$object);
} else {
unlink($dir.'/'.$object);
}
} }
} }
rmdir($dir); rmdir($dir);

View File

@@ -2,23 +2,22 @@
namespace VendorName\Skeleton; namespace VendorName\Skeleton;
use Filament\Facades\Filament;
use Filament\Context; use Filament\Context;
use Filament\PluginServiceProvider; use Filament\Facades\Filament;
use Filament\Support\Assets\AssetManager; use Filament\Support\Assets\AlpineComponent;
use Filament\Support\Assets\Js;
use Filament\Support\Assets\Css;
use Filament\Support\Assets\Asset; use Filament\Support\Assets\Asset;
use Filament\Support\Assets\AssetManager;
use Filament\Support\Assets\Css;
use Filament\Support\Assets\Js;
use Filament\Support\Facades\FilamentAsset; use Filament\Support\Facades\FilamentAsset;
use Filament\Support\Facades\FilamentIcon; use Filament\Support\Facades\FilamentIcon;
use Filament\Support\Icons\Icon; use Filament\Support\Icons\Icon;
use Filament\Support\Icons\IconManager; use Filament\Support\Icons\IconManager;
use Filament\Support\Assets\AlpineComponent;
use Illuminate\Filesystem\Filesystem; use Illuminate\Filesystem\Filesystem;
use Livewire\Testing\TestableLivewire;
use Spatie\LaravelPackageTools\Commands\InstallCommand;
use Spatie\LaravelPackageTools\Package; use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider; use Spatie\LaravelPackageTools\PackageServiceProvider;
use Spatie\LaravelPackageTools\Commands\InstallCommand;
use Livewire\Testing\TestableLivewire;
use VendorName\Skeleton\Commands\SkeletonCommand; use VendorName\Skeleton\Commands\SkeletonCommand;
use VendorName\Skeleton\Testing\TestsSkeleton; use VendorName\Skeleton\Testing\TestsSkeleton;
@@ -32,7 +31,7 @@ class SkeletonServiceProvider extends PackageServiceProvider
{ {
$package->name(static::$name) $package->name(static::$name)
->hasCommands($this->getCommands()) ->hasCommands($this->getCommands())
->hasInstallCommand(function(InstallCommand $command) { ->hasInstallCommand(function (InstallCommand $command) {
$command $command
->publishConfigFile() ->publishConfigFile()
->publishMigrations() ->publishMigrations()
@@ -91,7 +90,7 @@ class SkeletonServiceProvider extends PackageServiceProvider
// Handle Stubs // Handle Stubs
if ($this->app->runningInConsole()) { if ($this->app->runningInConsole()) {
foreach (app(Filesystem::class)->files(__DIR__ . '/../stubs/') as $file) { foreach (app(Filesystem::class)->files(__DIR__.'/../stubs/') as $file) {
$this->publishes([ $this->publishes([
$file->getRealPath() => base_path("stubs/skeleton/{$file->getFilename()}"), $file->getRealPath() => base_path("stubs/skeleton/{$file->getFilename()}"),
], 'forms-stubs'); ], 'forms-stubs');
@@ -114,8 +113,8 @@ class SkeletonServiceProvider extends PackageServiceProvider
{ {
return [ return [
// AlpineComponent::make('skeleton', __DIR__ . '/../resources/dist/components/skeleton.js'), // AlpineComponent::make('skeleton', __DIR__ . '/../resources/dist/components/skeleton.js'),
Css::make('skeleton-styles', __DIR__ . '/../resources/dist/skeleton.js'), Css::make('skeleton-styles', __DIR__.'/../resources/dist/skeleton.js'),
Js::make('skeleton-scripts', __DIR__ . '/../resources/dist/skeleton.js'), Js::make('skeleton-scripts', __DIR__.'/../resources/dist/skeleton.js'),
]; ];
} }
@@ -125,7 +124,7 @@ class SkeletonServiceProvider extends PackageServiceProvider
protected function getCommands(): array protected function getCommands(): array
{ {
return [ return [
SkeletonCommand::class SkeletonCommand::class,
]; ];
} }
@@ -167,7 +166,7 @@ class SkeletonServiceProvider extends PackageServiceProvider
protected function getMigrations(): array protected function getMigrations(): array
{ {
return [ return [
'create_skeleton_table' 'create_skeleton_table',
]; ];
} }

View File

@@ -4,8 +4,8 @@ namespace VendorName;
use Filament\Context; use Filament\Context;
use Filament\Contracts\Plugin; use Filament\Contracts\Plugin;
use Filament\Support\Color;
use Filament\Support\Assets\Theme; use Filament\Support\Assets\Theme;
use Filament\Support\Color;
use Filament\Support\Facades\FilamentAsset; use Filament\Support\Facades\FilamentAsset;
class Skeleton implements Plugin class Skeleton implements Plugin

View File

@@ -2,7 +2,6 @@
namespace VendorName\Skeleton\Testing; namespace VendorName\Skeleton\Testing;
use Illuminate\Testing\Assert;
use Livewire\Testing\TestableLivewire; use Livewire\Testing\TestableLivewire;
/** /**