dev-master
9999999-devAsset combiner for Yii2
BSD-3-Clause
The Requires
by Anton Sadovnikoff
by Mikhail Meschangin
yii2 asset combine concat
Wallogit.com
2017 © Pedro PelΓ‘ez
Asset combiner for Yii2
Yii 2 extension to compress and concatenate assets, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
$ composer require siddthartha/yii2-asset-combiner
or add, (*4)
"siddthartha/yii2-asset-combiner": "*"
to the require section of your composer.json file., (*5)
'view' => [
// asset combiner config
'class' => yii\web\View::className(),
'as assetCombiner' => [
'class' => \AssetCombiner\AssetCombinerBehavior::className(),
// Π²ΠΊΠ»-Π²ΡΠΊΠ», ΠΌΠΎΠΆΠ½ΠΎ ΠΌΠ΅ΡΠ΄ΠΆΠΈΡΡ Π² ΠΊΠΎΠ½ΡΠΈΠ³Π°Ρ
Π² Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠΈ ΠΎΡ environment dev, master, local
'enabled' => true,
// ΠΈΡΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΠΈΠ· ΠΊΠΎΠΌΠΏΠΈΠ»ΡΡΠΈΠΈ
// ΠΌΠΎΠΆΠ½ΠΎ ΡΠΊΠ°Π·ΡΠ²Π°ΡΡ Π·Π΄Π΅ΡΡ (Π²Π΅Π½Π΄ΠΎΡΠ½ΡΠ΅ Π°ΡΡΠ΅ΡΡ), Π° ΠΌΠΎΠΆΠ½ΠΎ Π² ΠΊΠΎΠ½ΠΊΡΠ΅ΡΠ½ΠΎΠΌ Π°ΡΡΠ΅ΡΠ΅ Π΅ΡΠ»ΠΈ Π½Π°Ρ
// publishOptions = [ 'monolith' => false ] // ΠΏΡΠΈΠ½ΡΠ΄ΠΈΡΠ΅Π»ΡΠ½ΠΎ Π²ΡΠΊΠ»
'exclude' => [
],
/**/
'filterJs' => [
'class' => \AssetCombiner\filters\UglifyJsFilter::className(),
'sourceMap' => false,
'compress' => false,
'mangle' => false,
'beautify' => true,
'keepFunctionNames' => true,
'keepComments' => true,
],
/**/
'filterCss' => [
'class' => \AssetCombiner\filters\UglifyCssFilter::className(),
'sort' => true,
],
/**/
],
// end of asset combiner config
...
],
sudo npm -g install uglifyjs
sudo npm -g install uglifycss, (*6)
Asset combiner for Yii2
BSD-3-Clause
yii2 asset combine concat