@@ -28,43 +28,38 @@ protected static function updatePackageArray(array $packages)
28
28
{
29
29
return array_merge ([
30
30
'laravel-mix ' => '^2.1 ' ,
31
- 'laravel-mix-purgecss ' => '^2.0 ' ,
31
+ 'laravel-mix-purgecss ' => '^2.2 ' ,
32
32
'laravel-mix-tailwind ' => '^0.1.0 ' ,
33
33
], Arr::except ($ packages , [
34
34
'bootstrap ' ,
35
35
'bootstrap-sass ' ,
36
36
'laravel-mix ' ,
37
37
'jquery ' ,
38
- 'popper.js ' ,
39
38
]));
40
39
}
41
40
42
41
protected static function updateStyles ()
43
42
{
44
43
tap (new Filesystem , function ($ filesystem ) {
45
- $ filesystem ->deleteDirectory (resource_path (self :: flattenPath ( 'sass ' ) ));
44
+ $ filesystem ->deleteDirectory (resource_path ('sass ' ));
46
45
$ filesystem ->delete (public_path ('js/app.js ' ));
47
46
$ filesystem ->delete (public_path ('css/app.css ' ));
48
47
49
- if (! $ filesystem ->isDirectory ($ directory = resource_path (self :: flattenPath ( 'css ' )))) {
48
+ if (! $ filesystem ->isDirectory ($ directory = resource_path ('css ' ))) {
50
49
$ filesystem ->makeDirectory ($ directory , 0755 , true );
51
50
}
52
51
});
53
52
54
- copy (__DIR__ .'/tailwindcss-stubs/resources/assets/ css/app.css ' , resource_path (self :: flattenPath ( 'css/app.css ' ) ));
53
+ copy (__DIR__ .'/tailwindcss-stubs/resources/css/app.css ' , resource_path ('css/app.css ' ));
55
54
}
56
55
57
56
protected static function updateBootstrapping ()
58
57
{
59
58
copy (__DIR__ .'/tailwindcss-stubs/tailwind.js ' , base_path ('tailwind.js ' ));
60
59
61
- if (self ::flattenResources ()) {
62
- copy (__DIR__ .'/tailwindcss-stubs/webpack57.mix.js ' , base_path ('webpack.mix.js ' ));
63
- } else {
64
- copy (__DIR__ .'/tailwindcss-stubs/webpack.mix.js ' , base_path ('webpack.mix.js ' ));
65
- }
60
+ copy (__DIR__ .'/tailwindcss-stubs/webpack.mix.js ' , base_path ('webpack.mix.js ' ));
66
61
67
- copy (__DIR__ .'/tailwindcss-stubs/resources/assets/ js/bootstrap.js ' , resource_path (self :: flattenPath ( 'js/bootstrap.js ' ) ));
62
+ copy (__DIR__ .'/tailwindcss-stubs/resources/js/bootstrap.js ' , resource_path ('js/bootstrap.js ' ));
68
63
}
69
64
70
65
protected static function updateWelcomePage ()
@@ -95,14 +90,4 @@ protected static function compileControllerStub()
95
90
file_get_contents (__DIR__ .'/tailwindcss-stubs/controllers/HomeController.stub ' )
96
91
);
97
92
}
98
-
99
- private static function flattenResources ()
100
- {
101
- return version_compare (app ()->version (), '5.7.0 ' , '>= ' );
102
- }
103
-
104
- private static function flattenPath ($ path )
105
- {
106
- return ((self ::flattenResources ()) ? '' : 'assets/ ' ) . $ path ;
107
- }
108
93
}
0 commit comments