Skip to content

Commit 6dc232d

Browse files
Fix copy of shared, page components
1 parent 907162e commit 6dc232d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/InertiaJsPreset.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ protected static function updateGitignore()
5656

5757
protected static function scaffoldComponents()
5858
{
59-
(new Filesystem)->copyDirectory(__DIR__.'/inertiajs-stubs/resources/js/Shared', resource_path('js'));
59+
tap(new Filesystem, function ($fs) {
60+
$fs->deleteDirectory(resource_path('js/components'));
6061

61-
(new Filesystem)->copyDirectory(__DIR__.'/inertiajs-stubs/resources/js/Pages', resource_path('js'));
62+
$fs->copyDirectory(__DIR__.'/inertiajs-stubs/resources/js/Shared', resource_path('js/Shared'));
63+
64+
$fs->copyDirectory(__DIR__.'/inertiajs-stubs/resources/js/Pages', resource_path('js/Pages'));
65+
});
6266
}
6367

6468
protected static function scaffoldRoutes()

0 commit comments

Comments
 (0)