|
8 | 8 | $authorEmail = ask('Author email', $gitEmail); |
9 | 9 |
|
10 | 10 | $usernameGuess = explode(':', run('git config remote.origin.url'))[1]; |
11 | | -if ($usernameGuess) { |
12 | | - $usernameGuess = dirname($usernameGuess); |
13 | | - $usernameGuess = basename($usernameGuess); |
14 | | -} |
| 11 | +$usernameGuess = dirname($usernameGuess); |
| 12 | +$usernameGuess = basename($usernameGuess); |
15 | 13 | $authorUsername = ask('Author username', $usernameGuess); |
16 | 14 |
|
17 | 15 | $vendorName = ask('Vendor name', $authorUsername); |
|
85 | 83 | ]); |
86 | 84 | } else { |
87 | 85 | 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'); |
88 | 89 | safeUnlink(__DIR__.'/src/SkeletonServiceProvider.php'); |
89 | 90 | safeUnlink(__DIR__.'/src/Skeleton.php'); |
90 | 91 | removeDirectory(__DIR__.'/config'); |
|
98 | 99 | removeDirectory(__DIR__.'/src/Testing'); |
99 | 100 | } else { |
100 | 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 | 105 | } |
102 | 106 |
|
103 | 107 | remove_composer_filament_deps([ |
|
106 | 110 | ]); |
107 | 111 | } |
108 | 112 |
|
109 | | -if ($isTheme) { |
110 | | - copy(__DIR__.'/configure-stubs/theme/package.json', __DIR__.'/package.json'); |
111 | | - copy(__DIR__.'/configure-stubs/theme/plugin.css', __DIR__.'/resources/css/plugin.css'); |
112 | | - copy(__DIR__.'/configure-stubs/theme/tailwind.config.js', __DIR__.'/tailwind.config.js'); |
113 | | -} else { |
114 | | - copy(__DIR__.'/configure-stubs/admin/package.json', __DIR__.'/package.json'); |
115 | | - copy(__DIR__.'/configure-stubs/admin/plugin.css', __DIR__.'/resources/css/plugin.css'); |
116 | | - copy(__DIR__.'/configure-stubs/admin/tailwind.config.js', __DIR__.'/tailwind.config.js'); |
117 | | -} |
118 | | - |
119 | 113 | $files = (str_starts_with(strtoupper(PHP_OS), 'WIN') ? replaceForWindows() : replaceForAllOtherOSes()); |
120 | 114 |
|
121 | 115 | foreach ($files as $file) { |
|
0 commit comments