-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show alert if assets are not up-to-date
- Loading branch information
Showing
5 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
public/vendor/butler/assets/app.dad26a4a.css → public/vendor/butler/assets/app.e652af71.css
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Butler\Service; | ||
|
||
use Illuminate\Support\Facades\File; | ||
|
||
class Butler | ||
{ | ||
public static function assetsAreCurrent(): bool | ||
{ | ||
$publishedManifest = public_path('vendor/butler/manifest.json'); | ||
$butlerManifest = __DIR__ . '/../public/vendor/butler/manifest.json'; | ||
|
||
throw_unless(File::exists($publishedManifest), 'Assets are not published.'); | ||
|
||
return File::get($publishedManifest) === File::get($butlerManifest); | ||
} | ||
} |