-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
BootstrapAsset.php
46 lines (36 loc) · 953 Bytes
/
BootstrapAsset.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
declare(strict_types=1);
namespace Yiisoft\Yii\Bootstrap5\Assets;
use Yiisoft\Assets\AssetBundle;
use Yiisoft\Files\PathMatcher\PathMatcher;
/**
* Asset bundle for the Twitter bootstrap css files.
*
* BootstrapAsset.
*
* @package Bootstrap5
*/
final class BootstrapAsset extends AssetBundle
{
public ?string $basePath = '@assets';
public ?string $baseUrl = '@assetsUrl';
public ?string $sourcePath = '@npm/bootstrap/dist';
public array $css = [
'css/bootstrap.css',
];
public array $js = [
'js/bootstrap.bundle.js',
];
public function __construct()
{
$pathMatcher = new PathMatcher();
$this->publishOptions = [
'filter' => $pathMatcher->only(
'**css/bootstrap.css',
'**css/bootstrap.css.map',
'**js/bootstrap.bundle.js',
'**js/bootstrap.bundle.js.map',
),
];
}
}