@@ -43,26 +43,26 @@ protected static function updateComposerArray(array $packages)
43
43
44
44
protected static function updateBootstrapping ()
45
45
{
46
- copy (__DIR__ . '/inertiajs-stubs/webpack.mix.js ' , base_path ('webpack.mix.js ' ));
46
+ copy (__DIR__ . '/inertiajs-stubs/webpack.mix.js ' , base_path ('webpack.mix.js ' ));
47
47
48
- copy (__DIR__ . '/inertiajs-stubs/resources/js/app.js ' , resource_path ('js/app.js ' ));
48
+ copy (__DIR__ . '/inertiajs-stubs/resources/js/app.js ' , resource_path ('js/app.js ' ));
49
49
50
- copy (__DIR__ . '/inertiajs-stubs/resources/sass/app.scss ' , resource_path ('sass/app.scss ' ));
51
- copy (__DIR__ . '/inertiajs-stubs/resources/sass/_nprogress.scss ' , resource_path ('sass/_nprogress.scss ' ));
50
+ copy (__DIR__ . '/inertiajs-stubs/resources/sass/app.scss ' , resource_path ('sass/app.scss ' ));
51
+ copy (__DIR__ . '/inertiajs-stubs/resources/sass/_nprogress.scss ' , resource_path ('sass/_nprogress.scss ' ));
52
52
}
53
53
54
54
protected static function updateWelcomePage ()
55
55
{
56
56
(new Filesystem )->delete (resource_path ('views/welcome.blade.php ' ));
57
57
58
- copy (__DIR__ . '/inertiajs-stubs/resources/views/app.blade.php ' , resource_path ('views/app.blade.php ' ));
58
+ copy (__DIR__ . '/inertiajs-stubs/resources/views/app.blade.php ' , resource_path ('views/app.blade.php ' ));
59
59
}
60
60
61
61
protected static function updateGitignore ()
62
62
{
63
63
file_put_contents (
64
64
base_path ('.gitignore ' ),
65
- file_get_contents (__DIR__ . '/inertiajs-stubs/gitignore ' ),
65
+ file_get_contents (__DIR__ . '/inertiajs-stubs/gitignore ' ),
66
66
FILE_APPEND
67
67
);
68
68
}
@@ -72,20 +72,20 @@ protected static function scaffoldComponents()
72
72
tap (new Filesystem , function (Filesystem $ fs ) {
73
73
$ fs ->deleteDirectory (resource_path ('js/components ' ));
74
74
75
- $ fs ->copyDirectory (__DIR__ . '/inertiajs-stubs/resources/js/Shared ' , resource_path ('js/Shared ' ));
75
+ $ fs ->copyDirectory (__DIR__ . '/inertiajs-stubs/resources/js/Shared ' , resource_path ('js/Shared ' ));
76
76
77
- $ fs ->copyDirectory (__DIR__ . '/inertiajs-stubs/resources/js/Pages ' , resource_path ('js/Pages ' ));
77
+ $ fs ->copyDirectory (__DIR__ . '/inertiajs-stubs/resources/js/Pages ' , resource_path ('js/Pages ' ));
78
78
});
79
79
}
80
80
81
81
protected static function scaffoldRoutes ()
82
82
{
83
- copy (__DIR__ . '/inertiajs-stubs/routes/web.php ' , base_path ('routes/web.php ' ));
83
+ copy (__DIR__ . '/inertiajs-stubs/routes/web.php ' , base_path ('routes/web.php ' ));
84
84
}
85
85
86
86
protected static function updateComposer ($ dev = true )
87
87
{
88
- if (!file_exists (base_path ('composer.json ' ))) {
88
+ if (! file_exists (base_path ('composer.json ' ))) {
89
89
return ;
90
90
}
91
91
@@ -101,14 +101,14 @@ protected static function updateComposer($dev = true)
101
101
102
102
file_put_contents (
103
103
base_path ('composer.json ' ),
104
- json_encode ($ packages , JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT ) . PHP_EOL
104
+ json_encode ($ packages , JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT ). PHP_EOL
105
105
);
106
106
}
107
107
108
108
public static function publishInertiaServiceProvider ()
109
109
{
110
110
copy (
111
- __DIR__ . '/inertiajs-stubs/providers/InertiaJsServiceProvider.stub ' ,
111
+ __DIR__ . '/inertiajs-stubs/providers/InertiaJsServiceProvider.stub ' ,
112
112
app_path ('Providers/InertiaJsServiceProvider.php ' )
113
113
);
114
114
}
@@ -119,7 +119,7 @@ public static function registerInertiaServiceProvider()
119
119
120
120
$ appConfig = file_get_contents (config_path ('app.php ' ));
121
121
122
- if (Str::contains ($ appConfig , $ namespace . '\\Providers \\InertiaJsServiceProvider::class ' )) {
122
+ if (Str::contains ($ appConfig , $ namespace. '\\Providers \\InertiaJsServiceProvider::class ' )) {
123
123
return ;
124
124
}
125
125
@@ -132,8 +132,8 @@ public static function registerInertiaServiceProvider()
132
132
$ eol = array_keys ($ lineEndingCount , max ($ lineEndingCount ))[0 ];
133
133
134
134
file_put_contents (config_path ('app.php ' ), str_replace (
135
- "{$ namespace }\\Providers \\RouteServiceProvider::class, " . $ eol ,
136
- "{$ namespace }\\Providers \\RouteServiceProvider::class, " . $ eol . " {$ namespace }\Providers\InertiaJsServiceProvider::class, " . $ eol ,
135
+ "{$ namespace }\\Providers \\RouteServiceProvider::class, " . $ eol ,
136
+ "{$ namespace }\\Providers \\RouteServiceProvider::class, " . $ eol. " {$ namespace }\Providers\InertiaJsServiceProvider::class, " . $ eol ,
137
137
$ appConfig
138
138
));
139
139
0 commit comments