forked from livewire/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
30 lines (24 loc) · 940 Bytes
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
use App\Listeners\GenerateSitemap;
use TightenCo\Jigsaw\Jigsaw;
use Illuminate\Support\Facades\Blade;
/** @var $container \Illuminate\Container\Container */
/** @var $events \TightenCo\Jigsaw\Events\EventBus */
/**
* You can run custom code at different stages of the build process by
* listening to the 'beforeBuild', 'afterCollections', and 'afterBuild' events.
*
* For example:
*
* $events->beforeBuild(function (Jigsaw $jigsaw) {
* // Your code here
* });
*/
$events->beforeBuild(function (Jigsaw $jigsaw) {
$compiler = $jigsaw->app->make(\Illuminate\View\Factory::class)->getEngineResolver()->resolve('blade')->getCompiler();
$compiler->component('_partials.code', 'code');
$compiler->component('_partials.code-component', 'codeComponent');
$compiler->component('_partials.warning', 'warning');
$compiler->component('_partials.tip', 'tip');
});
$events->afterBuild(GenerateSitemap::class);