How to add whole directory to js section in asset bundle yii2
I think that this will be something like this
class AppAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'css/site.min.css',
];
public $js = [
'js/myModule/*',
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
];
}
I want this because i don't want each time (when i minify my css or minify my js) write in asset bundle something like this
'css/site.min.css',
Instead of writing 'module.min.js', 'module2.min.js'
i'd like to write something like regex (to add whole directory) that will gather all files from directory and add them to my asset bundle and my $js
array will looks like next
'js/myModule/*',
So how to implement it? Is there anywhere is 'ready from the box' solution?
Please, help.
I asking this because 'is it normal that i (i use gulp and different minificators etc) write in asset bundle module.min.css
or module.min.js
'