init
This commit is contained in:
42
vendor/rmrevin/yii2-fontawesome/AssetBundle.php
vendored
Normal file
42
vendor/rmrevin/yii2-fontawesome/AssetBundle.php
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* AssetBundle.php
|
||||
* @author Revin Roman
|
||||
* @link https://rmrevin.ru
|
||||
*/
|
||||
|
||||
namespace rmrevin\yii\fontawesome;
|
||||
|
||||
/**
|
||||
* Class AssetBundle
|
||||
* @package rmrevin\yii\fontawesome
|
||||
*/
|
||||
class AssetBundle extends \yii\web\AssetBundle
|
||||
{
|
||||
|
||||
/**
|
||||
* @inherit
|
||||
*/
|
||||
public $sourcePath = '@vendor/fortawesome/font-awesome';
|
||||
|
||||
/**
|
||||
* @inherit
|
||||
*/
|
||||
public $css = [
|
||||
'css/font-awesome.min.css',
|
||||
];
|
||||
|
||||
/**
|
||||
* Initializes the bundle.
|
||||
* Set publish options to copy only necessary files (in this case css and font folders)
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->publishOptions['beforeCopy'] = function ($from, $to) {
|
||||
return preg_match('%(/|\\\\)(fonts|css)%', $from);
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user