2
2
3
3
namespace LaravelFrontendPresets \TailwindCssPreset ;
4
4
5
- use Illuminate \Support \Arr ;
6
- use Illuminate \Support \Str ;
7
5
use Illuminate \Container \Container ;
8
6
use Illuminate \Filesystem \Filesystem ;
7
+ use Illuminate \Support \Arr ;
8
+ use Illuminate \Support \Str ;
9
9
use Laravel \Ui \Presets \Preset ;
10
10
use Symfony \Component \Finder \SplFileInfo ;
11
11
@@ -49,33 +49,33 @@ protected static function updateStyles()
49
49
$ filesystem ->delete (public_path ('js/app.js ' ));
50
50
$ filesystem ->delete (public_path ('css/app.css ' ));
51
51
52
- if (!$ filesystem ->isDirectory ($ directory = resource_path ('css ' ))) {
52
+ if (! $ filesystem ->isDirectory ($ directory = resource_path ('css ' ))) {
53
53
$ filesystem ->makeDirectory ($ directory , 0755 , true );
54
54
}
55
55
});
56
56
57
- copy (__DIR__ . '/tailwindcss-stubs/resources/css/app.css ' , resource_path ('css/app.css ' ));
57
+ copy (__DIR__ . '/tailwindcss-stubs/resources/css/app.css ' , resource_path ('css/app.css ' ));
58
58
}
59
59
60
60
protected static function updateBootstrapping ()
61
61
{
62
- copy (__DIR__ . '/tailwindcss-stubs/tailwind.config.js ' , base_path ('tailwind.config.js ' ));
62
+ copy (__DIR__ . '/tailwindcss-stubs/tailwind.config.js ' , base_path ('tailwind.config.js ' ));
63
63
64
- copy (__DIR__ . '/tailwindcss-stubs/webpack.mix.js ' , base_path ('webpack.mix.js ' ));
64
+ copy (__DIR__ . '/tailwindcss-stubs/webpack.mix.js ' , base_path ('webpack.mix.js ' ));
65
65
66
- copy (__DIR__ . '/tailwindcss-stubs/resources/js/bootstrap.js ' , resource_path ('js/bootstrap.js ' ));
66
+ copy (__DIR__ . '/tailwindcss-stubs/resources/js/bootstrap.js ' , resource_path ('js/bootstrap.js ' ));
67
67
}
68
68
69
69
protected static function updateWelcomePage ()
70
70
{
71
71
(new Filesystem )->delete (resource_path ('views/welcome.blade.php ' ));
72
72
73
- copy (__DIR__ . '/tailwindcss-stubs/resources/views/welcome.blade.php ' , resource_path ('views/welcome.blade.php ' ));
73
+ copy (__DIR__ . '/tailwindcss-stubs/resources/views/welcome.blade.php ' , resource_path ('views/welcome.blade.php ' ));
74
74
}
75
75
76
76
protected static function scaffoldController ()
77
77
{
78
- if (!is_dir ($ directory = app_path ('Http/Controllers/Auth ' ))) {
78
+ if (! is_dir ($ directory = app_path ('Http/Controllers/Auth ' ))) {
79
79
mkdir ($ directory , 0755 , true );
80
80
}
81
81
@@ -85,7 +85,7 @@ protected static function scaffoldController()
85
85
->each (function (SplFileInfo $ file ) use ($ filesystem ) {
86
86
$ filesystem ->copy (
87
87
$ file ->getPathname (),
88
- app_path ('Http/Controllers/Auth/ ' . Str::replaceLast ('.stub ' , '.php ' , $ file ->getFilename ()))
88
+ app_path ('Http/Controllers/Auth/ ' . Str::replaceLast ('.stub ' , '.php ' , $ file ->getFilename ()))
89
89
);
90
90
});
91
91
}
@@ -101,13 +101,13 @@ protected static function scaffoldAuth()
101
101
);
102
102
103
103
tap (new Filesystem , function ($ filesystem ) {
104
- $ filesystem ->copyDirectory (__DIR__ . '/tailwindcss-stubs/resources/views ' , resource_path ('views ' ));
104
+ $ filesystem ->copyDirectory (__DIR__ . '/tailwindcss-stubs/resources/views ' , resource_path ('views ' ));
105
105
106
106
collect ($ filesystem ->allFiles (base_path ('vendor/laravel/ui/stubs/migrations ' )))
107
107
->each (function (SplFileInfo $ file ) use ($ filesystem ) {
108
108
$ filesystem ->copy (
109
109
$ file ->getPathname (),
110
- database_path ('migrations/ ' . $ file ->getFilename ())
110
+ database_path ('migrations/ ' . $ file ->getFilename ())
111
111
);
112
112
});
113
113
});
@@ -118,7 +118,7 @@ protected static function compileControllerStub()
118
118
return str_replace (
119
119
'{{namespace}} ' ,
120
120
Container::getInstance ()->getNamespace (),
121
- file_get_contents (__DIR__ . '/tailwindcss-stubs/controllers/HomeController.stub ' )
121
+ file_get_contents (__DIR__ . '/tailwindcss-stubs/controllers/HomeController.stub ' )
122
122
);
123
123
}
124
124
}
0 commit comments