Skip to content

Commit 3dc5428

Browse files
committed
Added Laravel Pint, removed old fix-style command
1 parent fe1f787 commit 3dc5428

File tree

6 files changed

+16
-54
lines changed

6 files changed

+16
-54
lines changed

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.3|^8.0",
19+
"php": "^8.0",
20+
"barryvdh/laravel-debugbar": "^3.6",
21+
"laravel/pint": "^0.1.0",
2022
"laravel/ui": "^3.0",
23+
"pestphp/pest-plugin-laravel": "^1.2.0",
2124
"whitecube/bem-components": "^1.1",
22-
"whitecube/laravel-sluggable": "^1.6",
23-
"barryvdh/laravel-debugbar": "^3.6",
24-
"pestphp/pest-plugin-laravel": "^1.2.0"
25+
"whitecube/laravel-sluggable": "^1.6"
2526
},
2627
"require-dev": {
2728
"jubeki/laravel-code-style": "^1.0",

src/Codestyle.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ class Codestyle
1010
public static function install(UiCommand $command)
1111
{
1212
$command->info('Installing code style fixer...');
13-
$command->call('vendor:publish', [
14-
'--provider' => 'MattAllan\LaravelCodeStyle\ServiceProvider'
15-
]);
13+
14+
copy(__DIR__.'/stubs/pint.json', base_path('pint.json'));
1615
}
1716

1817
}

src/ComposerEnv.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,11 @@ public static function addComposerScripts()
3535
'scripts.pre-update-cmd',
3636
'App\\Console\\Commands\\ComposerEnv::loadLocalRepositories'
3737
]);
38+
39+
$composer->run([
40+
'config',
41+
'scripts.fix-style',
42+
'./vendor/bin/pint --preset laravel'
43+
]);
3844
}
3945
}

src/Console/FixStyleCommand.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/WhitecubeServiceProvider.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,5 @@ public function boot()
2929
*/
3030
public function register()
3131
{
32-
$this->commands([
33-
FixStyleCommand::class
34-
]);
3532
}
3633
}

src/stubs/pint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"preset": "laravel"
3+
}

0 commit comments

Comments
 (0)