2017 © Pedro PelΓ‘ez
 

yii2-extension yii2-asset-combiner

Asset combiner for Yii2

image

siddthartha/yii2-asset-combiner

Asset combiner for Yii2

  • Monday, April 3, 2017
  • by siddthartha
  • Repository
  • 1 Watchers
  • 0 Stars
  • 43 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 5 % Grown

The README.md

Asset combiner for Yii 2

Yii 2 extension to compress and concatenate assets, (*1)

Installation

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)

The Versions

03/04 2017

dev-master

9999999-dev

Asset combiner for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Anton Sadovnikoff
by Mikhail Meschangin

yii2 asset combine concat