2017 © Pedro Peláez
 

yii2-extension yii2-assets-auto-compress

Automatically compile and merge files js + css + html in yii2 project

image

skeeks/yii2-assets-auto-compress

Automatically compile and merge files js + css + html in yii2 project

  • Thursday, June 7, 2018
  • by skeeks-semenov
  • Repository
  • 13 Watchers
  • 91 Stars
  • 48,664 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 29 Forks
  • 32 Open issues
  • 23 Versions
  • 10 % Grown

The README.md

Automatically compile and merge files js + css + html in yii2 project.

This solution enables you to dynamically combine js and css files to optimize the html page. This allows you to improve the performance of google page speed., (*1)

This tool only works on real sites. On the local projects is not working!, (*2)

Latest Stable Version Total Downloads, (*3)

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

php composer.phar require --prefer-dist skeeks/yii2-assets-auto-compress "*"

or add, (*6)

"skeeks/yii2-assets-auto-compress": "*"

How to use

//App config
[
    'bootstrap'    => ['assetsAutoCompress'],
    'components'    =>
    [
    //....
        'assetsAutoCompress' =>
        [
            'class'         => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
        ],
    //....
    ]
]

//App config with all options
[
    'bootstrap'  => ['assetsAutoCompress'],
    'components' => [
        //....
        'assetsAutoCompress' => [
            'class'   => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
            'enabled' => true,

            'readFileTimeout' => 3,           //Time in seconds for reading each asset file

            'jsCompress'                => true,        //Enable minification js in html code
            'jsCompressFlaggedComments' => true,        //Cut comments during processing js

            'cssCompress' => true,        //Enable minification css in html code

            'cssFileCompile'        => true,        //Turning association css files
            'cssFileCompileByGroups' => false       //Enables the compilation of files in groups rather than in a single file. Works only when the $cssFileCompile option is enabled
            'cssFileRemouteCompile' => false,       //Trying to get css files to which the specified path as the remote file, skchat him to her.
            'cssFileCompress'       => true,        //Enable compression and processing before being stored in the css file
            'cssFileBottom'         => false,       //Moving down the page css files
            'cssFileBottomLoadOnJs' => false,       //Transfer css file down the page and uploading them using js

            'jsFileCompile'                 => true,        //Turning association js files
            'jsFileCompileByGroups'         => false        //Enables the compilation of files in groups rather than in a single file. Works only when the $jsFileCompile option is enabled
            'jsFileRemouteCompile'          => false,       //Trying to get a js files to which the specified path as the remote file, skchat him to her.
            'jsFileCompress'                => true,        //Enable compression and processing js before saving a file
            'jsFileCompressFlaggedComments' => true,        //Cut comments during processing js

            'noIncludeJsFilesOnPjax' => true,        //Do not connect the js files when all pjax requests when all pjax requests when enabled jsFileCompile
            'noIncludeCssFilesOnPjax' => true,        //Do not connect the css files when all pjax requests when all pjax requests when enabled cssFileCompile

            'htmlFormatter' => [
                //Enable compression html
                'class'         => 'skeeks\yii2\assetsAuto\formatters\html\TylerHtmlCompressor',
                'extra'         => false,       //use more compact algorithm
                'noComments'    => true,        //cut all the html comments
                'maxNumberRows' => 50000,       //The maximum number of rows that the formatter runs on

                //or

                'class' => 'skeeks\yii2\assetsAuto\formatters\html\MrclayHtmlCompressor',

                //or any other your handler implements skeeks\yii2\assetsAuto\IFormatter interface

                //or false
            ],
        ],
        //....
    ],
];

Demo (view source code)

Screenshot

SkeekS CMS admin panel, (*7)


SkeekS CMS admin panel, (*8)


SkeekS CMS admin panel, (*9)


SkeekS CMS admin panel, (*10)


skeeks!
SkeekS CMS (Yii2) — fast, simple, effective!
skeeks.com | cms.skeeks.com, (*11)

The Versions

07/06 2018

dev-master

9999999-dev https://www.skeeks.com/

Automatically compile and merge files js + css + html in yii2 project

  Sources   Download

BSD-3-Clause GPL-3.0+

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

07/06 2018

1.4.1

1.4.1.0 https://www.skeeks.com/

Automatically compile and merge files js + css + html in yii2 project

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

04/04 2018

1.4.0

1.4.0.0 https://www.skeeks.com/

Automatically compile and merge files js + css + html in yii2 project

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

05/10 2017

1.3.1.2

1.3.1.2 http://www.skeeks.com/

Automatically compile and merge files js + css + html in yii2 project

  Sources   Download

GPL-3.0+

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

05/10 2017

1.3.1.1

1.3.1.1 http://www.skeeks.com/

Automatically compile and merge files js + css + html in yii2 project

  Sources   Download

GPL-3.0+

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

05/10 2017

1.3.1

1.3.1.0 http://www.skeeks.com/

Automatically compile and merge files js + css + html in yii2 project

  Sources   Download

GPL-3.0+

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

05/10 2017

1.3.1-rc

1.3.1.0-RC http://www.skeeks.com/

Automatically compile and merge files js + css + html in yii2 project

  Sources   Download

GPL-3.0+

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

16/09 2017

1.3.0

1.3.0.0 http://www.skeeks.com/

Automatically compile and merge files js + css + html in yii2 project

  Sources   Download

GPL-3.0+

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

15/09 2017

dev-yii2-httpclient

dev-yii2-httpclient http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

14/07 2017

1.2.3.1

1.2.3.1 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

11/11 2016

1.2.3

1.2.3.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

10/10 2016

1.2.2

1.2.2.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

29/07 2016

1.2.1

1.2.1.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

16/07 2016

1.2.0

1.2.0.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

16/07 2016

1.1.2

1.1.2.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

06/07 2016

dev-issues-7

dev-issues-7 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

11/02 2016

1.1.1

1.1.1.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

11/02 2016

1.1.0

1.1.0.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

10/02 2016

1.0.4

1.0.4.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

12/08 2015

1.0.3

1.0.3.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

09/08 2015

1.0.2

1.0.2.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

06/08 2015

1.0.1

1.0.1.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets

06/08 2015

1.0.0

1.0.0.0 http://www.skeeks.com/

Automatically compile and merge files js + css

  Sources   Download

BSD-3-Clause

The Requires

 

by Semenov Alexander

framework css app yii assets js sx skeeks auto assets