Update BootstrapPluginAsset (#51)
* Update BootstrapPluginAsset - Load minified JS on production - Optimize list of publishes files - Normalize comments * Update BootstrapPluginAsset.php * Update BootstrapPluginAsset.php * Update CHANGELOG.md
This commit is contained in:
parent
3111ba58fa
commit
db6208a2d7
@ -9,6 +9,7 @@ Yii Framework 2 bootstrap5 extension Change Log
|
||||
- Enh #40: Breadcrumbs refactoring (WinterSilence)
|
||||
- Bug #46: Fix data-attribute usage for Dropdown toggle (machour)
|
||||
- Enh #48: Update `BootstrapWidgetTrait` to initialize JS plugins without jQuery (WinterSilence)
|
||||
- Bug #51: Update `BootstrapPluginAsset` to load minified JS on production, optimize and fix list of publishes files (WinterSilence)
|
||||
- Bug #52: Update `BootstrapAsset` to load minified CSS on production, optimize and fix list of publishes files (WinterSilence)
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* @link http://www.yiiframework.com/
|
||||
* @link https://www.yiiframework.com/
|
||||
* @copyright Copyright (c) 2008 Yii Software LLC
|
||||
* @license http://www.yiiframework.com/license/
|
||||
* @license https://www.yiiframework.com/license/
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
@ -12,17 +12,30 @@ namespace yii\bootstrap5;
|
||||
use yii\web\AssetBundle;
|
||||
|
||||
/**
|
||||
* Asset bundle for the Twitter bootstrap javascript files.
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* Twitter Bootstrap 5 JavaScript bundle.
|
||||
*/
|
||||
class BootstrapPluginAsset extends AssetBundle
|
||||
{
|
||||
public $sourcePath = '@bower/bootstrap/dist';
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public $sourcePath = '@bower/bootstrap';
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public $js = [
|
||||
'js/bootstrap.bundle.js',
|
||||
YII_ENV_PROD ? 'dist/js/bootstrap.bundle.min.js' : 'dist/js/bootstrap.bundle.js'
|
||||
];
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public $publishOptions = [
|
||||
'only' => ['dist/js/bootstrap.bundle.*', 'js/src/*.js', 'js/src/*/*.js']
|
||||
];
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public $depends = [
|
||||
BootstrapAsset::class,
|
||||
BootstrapAsset::class
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user