Skip to content

Commit

Permalink
Fix not overriding default resources/css/app.css files when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Nov 12, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 647cd37 commit d1704d9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
@@ -44,10 +44,12 @@ private function ensureTailwindConfigExists()
to: base_path('tailwind.config.js'),
);

$this->copyStubToAppIfMissing(
stub: __DIR__ . '/../../stubs/resources/css/app.css',
to: resource_path('css/app.css'),
);
if (! File::exists($appCssFilePath = resource_path('css/app.css')) || empty(trim(File::get($appCssFilePath)))) {
$this->copyStubToApp(
stub: __DIR__ . '/../../stubs/resources/css/app.css',
to: $appCssFilePath,
);
}

return self::SUCCESS;
});

0 comments on commit d1704d9

Please sign in to comment.