Revert "fix/copy-configure-stubs"

This reverts commit 77fcca19f8.
This commit is contained in:
Adam Weston
2023-01-08 12:34:01 -05:00
parent 77fcca19f8
commit 57623025e0
2 changed files with 8 additions and 15 deletions

1
.gitignore vendored
View File

@@ -9,4 +9,3 @@ phpstan.neon
testbench.yaml testbench.yaml
vendor vendor
node_modules node_modules
.DS_Store

View File

@@ -8,10 +8,8 @@ $gitEmail = run('git config user.email');
$authorEmail = ask('Author email', $gitEmail); $authorEmail = ask('Author email', $gitEmail);
$usernameGuess = explode(':', run('git config remote.origin.url'))[1]; $usernameGuess = explode(':', run('git config remote.origin.url'))[1];
if ($usernameGuess) {
$usernameGuess = dirname($usernameGuess); $usernameGuess = dirname($usernameGuess);
$usernameGuess = basename($usernameGuess); $usernameGuess = basename($usernameGuess);
}
$authorUsername = ask('Author username', $usernameGuess); $authorUsername = ask('Author username', $usernameGuess);
$vendorName = ask('Vendor name', $authorUsername); $vendorName = ask('Vendor name', $authorUsername);
@@ -85,6 +83,9 @@ if ($formsOnly) {
]); ]);
} else { } else {
if ($isTheme) { if ($isTheme) {
copy(__DIR__.'/configure-stubs/theme/package.json', __DIR__.'/package.json');
copy(__DIR__.'/configure-stubs/theme/plugin.css', __DIR__.'/resources/css/plugin.css');
copy(__DIR__.'/configure-stubs/theme/tailwind.config.js', __DIR__.'/tailwind.config.js');
safeUnlink(__DIR__.'/src/SkeletonServiceProvider.php'); safeUnlink(__DIR__.'/src/SkeletonServiceProvider.php');
safeUnlink(__DIR__.'/src/Skeleton.php'); safeUnlink(__DIR__.'/src/Skeleton.php');
removeDirectory(__DIR__.'/config'); removeDirectory(__DIR__.'/config');
@@ -98,6 +99,9 @@ if ($formsOnly) {
removeDirectory(__DIR__.'/src/Testing'); removeDirectory(__DIR__.'/src/Testing');
} else { } else {
safeUnlink(__DIR__.'/src/SkeletonTheme.php'); safeUnlink(__DIR__.'/src/SkeletonTheme.php');
copy(__DIR__.'/configure-stubs/package/package.json', __DIR__.'/package.json');
copy(__DIR__.'/configure-stubs/package/plugin.css', __DIR__.'/resources/css/plugin.css');
copy(__DIR__.'/configure-stubs/package/tailwind.config.js', __DIR__.'/tailwind.config.js');
} }
remove_composer_filament_deps([ remove_composer_filament_deps([
@@ -106,16 +110,6 @@ if ($formsOnly) {
]); ]);
} }
if ($isTheme) {
copy(__DIR__.'/configure-stubs/theme/package.json', __DIR__.'/package.json');
copy(__DIR__.'/configure-stubs/theme/plugin.css', __DIR__.'/resources/css/plugin.css');
copy(__DIR__.'/configure-stubs/theme/tailwind.config.js', __DIR__.'/tailwind.config.js');
} else {
copy(__DIR__.'/configure-stubs/admin/package.json', __DIR__.'/package.json');
copy(__DIR__.'/configure-stubs/admin/plugin.css', __DIR__.'/resources/css/plugin.css');
copy(__DIR__.'/configure-stubs/admin/tailwind.config.js', __DIR__.'/tailwind.config.js');
}
$files = (str_starts_with(strtoupper(PHP_OS), 'WIN') ? replaceForWindows() : replaceForAllOtherOSes()); $files = (str_starts_with(strtoupper(PHP_OS), 'WIN') ? replaceForWindows() : replaceForAllOtherOSes());
foreach ($files as $file) { foreach ($files as $file) {