Skip to content

Commit cff55a6

Browse files
awcodesgithub-actions[bot]
authored andcommitted
Fix styling
1 parent fbb2fa6 commit cff55a6

File tree

4 files changed

+40
-37
lines changed

4 files changed

+40
-37
lines changed

configure.php

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,25 @@
8383
]);
8484
} else {
8585
if ($isTheme) {
86-
copy(__DIR__ . '/configure-stubs/theme/package.json', __DIR__ . '/package.json');
87-
copy(__DIR__ . '/configure-stubs/theme/plugin.css', __DIR__ . '/resources/css/plugin.css');
88-
copy(__DIR__ . '/configure-stubs/theme/tailwind.config.js', __DIR__ . '/tailwind.config.js');
89-
safeUnlink(__DIR__ . '/src/SkeletonServiceProvider.php');
90-
safeUnlink(__DIR__ . '/src/Skeleton.php');
91-
removeDirectory(__DIR__ . '/config');
92-
removeDirectory(__DIR__ . '/database');
93-
removeDirectory(__DIR__ . '/stubs');
94-
removeDirectory(__DIR__ . '/resources/js');
95-
removeDirectory(__DIR__ . '/resources/lang');
96-
removeDirectory(__DIR__ . '/resources/views');
97-
removeDirectory(__DIR__ . '/src/Commands');
98-
removeDirectory(__DIR__ . '/src/Facades');
99-
removeDirectory(__DIR__ . '/src/Testing');
86+
copy(__DIR__.'/configure-stubs/theme/package.json', __DIR__.'/package.json');
87+
copy(__DIR__.'/configure-stubs/theme/plugin.css', __DIR__.'/resources/css/plugin.css');
88+
copy(__DIR__.'/configure-stubs/theme/tailwind.config.js', __DIR__.'/tailwind.config.js');
89+
safeUnlink(__DIR__.'/src/SkeletonServiceProvider.php');
90+
safeUnlink(__DIR__.'/src/Skeleton.php');
91+
removeDirectory(__DIR__.'/config');
92+
removeDirectory(__DIR__.'/database');
93+
removeDirectory(__DIR__.'/stubs');
94+
removeDirectory(__DIR__.'/resources/js');
95+
removeDirectory(__DIR__.'/resources/lang');
96+
removeDirectory(__DIR__.'/resources/views');
97+
removeDirectory(__DIR__.'/src/Commands');
98+
removeDirectory(__DIR__.'/src/Facades');
99+
removeDirectory(__DIR__.'/src/Testing');
100100
} else {
101-
safeUnlink(__DIR__ . '/src/SkeletonTheme.php');
102-
copy(__DIR__ . '/configure-stubs/package/package.json', __DIR__ . '/package.json');
103-
copy(__DIR__ . '/configure-stubs/package/plugin.css', __DIR__ . '/resources/css/plugin.css');
104-
copy(__DIR__ . '/configure-stubs/package/tailwind.config.js', __DIR__ . '/tailwind.config.js');
101+
safeUnlink(__DIR__.'/src/SkeletonTheme.php');
102+
copy(__DIR__.'/configure-stubs/package/package.json', __DIR__.'/package.json');
103+
copy(__DIR__.'/configure-stubs/package/plugin.css', __DIR__.'/resources/css/plugin.css');
104+
copy(__DIR__.'/configure-stubs/package/tailwind.config.js', __DIR__.'/tailwind.config.js');
105105
}
106106

107107
remove_composer_filament_deps([
@@ -186,7 +186,7 @@
186186
confirm('Execute `composer install` and run tests?') && run('composer install && composer test');
187187

188188
if (confirm('Let this script delete itself?', true)) {
189-
removeDirectory(__DIR__ . '/configure-stubs');
189+
removeDirectory(__DIR__.'/configure-stubs');
190190
unlink(__FILE__);
191191
}
192192

@@ -377,12 +377,17 @@ function replaceForAllOtherOSes(): array
377377
return explode(PHP_EOL, run('grep -E -r -l -i ":author|:vendor|:package|VendorName|skeleton|vendor_name|vendor_slug|[email protected]" --exclude-dir=vendor ./* ./.github/* | grep -v '.basename(__FILE__)));
378378
}
379379

380-
function removeDirectory($dir): void {
380+
function removeDirectory($dir): void
381+
{
381382
if (is_dir($dir)) {
382383
$objects = scandir($dir);
383384
foreach ($objects as $object) {
384-
if ($object != "." && $object != "..") {
385-
if (filetype($dir."/".$object) == "dir") removeDirectory($dir."/".$object); else unlink($dir."/".$object);
385+
if ($object != '.' && $object != '..') {
386+
if (filetype($dir.'/'.$object) == 'dir') {
387+
removeDirectory($dir.'/'.$object);
388+
} else {
389+
unlink($dir.'/'.$object);
390+
}
386391
}
387392
}
388393
rmdir($dir);

src/SkeletonServiceProvider.php

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,22 @@
22

33
namespace VendorName\Skeleton;
44

5-
use Filament\Facades\Filament;
65
use Filament\Context;
7-
use Filament\PluginServiceProvider;
6+
use Filament\Facades\Filament;
7+
use Filament\Support\Assets\AlpineComponent;
8+
use Filament\Support\Assets\Asset;
89
use Filament\Support\Assets\AssetManager;
9-
use Filament\Support\Assets\Js;
1010
use Filament\Support\Assets\Css;
11-
use Filament\Support\Assets\Asset;
11+
use Filament\Support\Assets\Js;
1212
use Filament\Support\Facades\FilamentAsset;
1313
use Filament\Support\Facades\FilamentIcon;
1414
use Filament\Support\Icons\Icon;
1515
use Filament\Support\Icons\IconManager;
16-
use Filament\Support\Assets\AlpineComponent;
1716
use Illuminate\Filesystem\Filesystem;
17+
use Livewire\Testing\TestableLivewire;
18+
use Spatie\LaravelPackageTools\Commands\InstallCommand;
1819
use Spatie\LaravelPackageTools\Package;
1920
use Spatie\LaravelPackageTools\PackageServiceProvider;
20-
use Spatie\LaravelPackageTools\Commands\InstallCommand;
21-
use Livewire\Testing\TestableLivewire;
2221
use VendorName\Skeleton\Commands\SkeletonCommand;
2322
use VendorName\Skeleton\Testing\TestsSkeleton;
2423

@@ -32,7 +31,7 @@ public function configurePackage(Package $package): void
3231
{
3332
$package->name(static::$name)
3433
->hasCommands($this->getCommands())
35-
->hasInstallCommand(function(InstallCommand $command) {
34+
->hasInstallCommand(function (InstallCommand $command) {
3635
$command
3736
->publishConfigFile()
3837
->publishMigrations()
@@ -91,7 +90,7 @@ public function packageBooted(): void
9190

9291
// Handle Stubs
9392
if ($this->app->runningInConsole()) {
94-
foreach (app(Filesystem::class)->files(__DIR__ . '/../stubs/') as $file) {
93+
foreach (app(Filesystem::class)->files(__DIR__.'/../stubs/') as $file) {
9594
$this->publishes([
9695
$file->getRealPath() => base_path("stubs/skeleton/{$file->getFilename()}"),
9796
], 'forms-stubs');
@@ -114,8 +113,8 @@ protected function getAssets(): array
114113
{
115114
return [
116115
// AlpineComponent::make('skeleton', __DIR__ . '/../resources/dist/components/skeleton.js'),
117-
Css::make('skeleton-styles', __DIR__ . '/../resources/dist/skeleton.js'),
118-
Js::make('skeleton-scripts', __DIR__ . '/../resources/dist/skeleton.js'),
116+
Css::make('skeleton-styles', __DIR__.'/../resources/dist/skeleton.js'),
117+
Js::make('skeleton-scripts', __DIR__.'/../resources/dist/skeleton.js'),
119118
];
120119
}
121120

@@ -125,7 +124,7 @@ protected function getAssets(): array
125124
protected function getCommands(): array
126125
{
127126
return [
128-
SkeletonCommand::class
127+
SkeletonCommand::class,
129128
];
130129
}
131130

@@ -167,7 +166,7 @@ protected function getScriptData(): array
167166
protected function getMigrations(): array
168167
{
169168
return [
170-
'create_skeleton_table'
169+
'create_skeleton_table',
171170
];
172171
}
173172

src/SkeletonTheme.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use Filament\Context;
66
use Filament\Contracts\Plugin;
7-
use Filament\Support\Color;
87
use Filament\Support\Assets\Theme;
8+
use Filament\Support\Color;
99
use Filament\Support\Facades\FilamentAsset;
1010

1111
class Skeleton implements Plugin

src/Testing/TestsSkeleton.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace VendorName\Skeleton\Testing;
44

5-
use Illuminate\Testing\Assert;
65
use Livewire\Testing\TestableLivewire;
76

87
/**

0 commit comments

Comments
 (0)