Skip to content

Commit da8bf41

Browse files
dbekeshenkoixvmikhav
authored andcommitted
feat(example-frontend-part): auto create root dir for frontend part
1 parent 0925d26 commit da8bf41

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/Commands/InertiaInitCommand.php

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ protected function updateNodePackages(callable $callback, $dev = true): void
120120

121121
private function makeStructure(): void
122122
{
123+
if(!$this->filesystem->exists(self::getInertiaPath())) {
124+
$this->filesystem->makeDirectory(path: self::getInertiaPath(), recursive: true);
125+
}
126+
123127
$this->filesystem->makeDirectory(path: self::getInertiaPath() . '/js/Components', recursive: true);
124128
$this->filesystem->makeDirectory(path: self::getInertiaPath() . '/js/Pages', recursive: true);
125129
$this->filesystem->makeDirectory(path: self::getInertiaPath() . '/js/Layouts', recursive: true);

0 commit comments

Comments
 (0)