Skip to content
Snippets Groups Projects
Commit d5742448 authored by Sohail Lajevardi's avatar Sohail Lajevardi
Browse files

Add automatic cleanup of StarterKit.php after subtheme creation

parent 68b5b0b5
No related branches found
Tags 6.0.0-beta7
No related merge requests found
Pipeline #70007 passed with warnings
......@@ -14,6 +14,7 @@ final class StarterKit implements StarterKitInterface {
self::renameFunctionsInIncludes($working_dir, $machine_name);
self::updatePackageJson($working_dir, $machine_name);
self::renameConfigFiles($working_dir, $machine_name);
self::cleanup($working_dir);
}
private static function updateInfoFile(string $working_dir, string $machine_name) {
......@@ -77,4 +78,11 @@ final class StarterKit implements StarterKitInterface {
}
}
}
private static function cleanup(string $working_dir): void {
$starterKitFilePath = $working_dir . '/src/StarterKit.php';
if (file_exists($starterKitFilePath)) {
unlink($starterKitFilePath);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment