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