Skip to content

Commit

Permalink
Export whole modules folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseleite committed Nov 11, 2024
1 parent cc89b46 commit 37b10c2
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/StarterKits/Exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public function export(): void
->validateExportPath()
->validateConfig()
->instantiateModules()
->exportModules()
->exportInlineModules()
->exportModulesFolder()
->exportConfig()
->exportHooks()
->exportComposerJson();
Expand Down Expand Up @@ -133,15 +134,25 @@ protected function normalizeModuleKey(string $key, string $childKey): string
}

/**
* Export all the modules.
* Export all inline modules.
*/
protected function exportModules(): self
protected function exportInlineModules(): self
{
$this->modules->each(fn ($module) => $module->export($this->exportPath));

return $this;
}

/**
* Export modules folder.
*/
protected function exportModulesFolder(): self
{
$this->files->copyDirectory(base_path('modules'), "{$this->exportPath}/modules");

return $this;
}

/**
* Get starter kit config.
*/
Expand Down

0 comments on commit 37b10c2

Please sign in to comment.