Skip to content

Commit

Permalink
Add experimental way to customize the written asset contents
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Oct 6, 2024
1 parent 0909f30 commit 1a77854
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Hyde\Framework\Actions\PreBuildTasks;

use Hyde\Facades\Filesystem;
use Hyde\Support\Filesystem\MediaFile;
use Hyde\Framework\Features\BuildTasks\PreBuildTask;
use Hyde\Framework\Concerns\InteractsWithDirectories;
Expand All @@ -25,7 +26,7 @@ public function handle(): void
$this->withProgressBar(MediaFile::all(), function (MediaFile $file): void {
$sitePath = $file->getOutputPath();
$this->needsParentDirectory($sitePath);
copy($file->getAbsolutePath(), $sitePath);
Filesystem::putContents($sitePath, $file->getContents());
});

$this->newLine();
Expand Down

0 comments on commit 1a77854

Please sign in to comment.