Compilateur Yii2 js et css (composant d'optimisation de code js et css)

Compilateur Yii2 js et css (composant d'optimisation de code js et css)

skeeks/yii2-assets-auto-compress

Installer

Compilateur Yii2 js et css (composant d'optimisation de code js et css)

Heure de publication: jeudi 6 août 2015 (il y a 4 ans)

Créé par: Семенов Александр Сергеевич

Catégorie: Marketing, publicité

Version actuelle: 1.4.2.1
11 déc. 2019 10:34:08 (il y a 2 jours)

Packagist: skeeks/yii2-assets-auto-compress

: https://github.com/skeeks-semenov/yii2-assets-auto-compress

: 92422 (Par mois: 3189)

Type: Компонент


Compilateur Yii2 js et css (composant d'optimisation de code js et css)

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.

This tool only works on real sites. On the local projects is not working!

Latest Stable Version Total Downloads

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"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
            '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
            '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

            '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
            ],
        ],
        //....
    ],
];

Links

Demo (view source code)

Screenshot

SkeekS CMS admin panel


SkeekS CMS admin panel


SkeekS CMS admin panel


SkeekS CMS admin panel


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

CHANGELOG

1.4.2

  • Fixed: https://github.com/skeeks-semenov/yii2-assets-auto-compress/issues/51

1.4.1

  • Logs
  • JsMinFormatter
  • CssMinFormatter

1.4.0

  • Use new config!

Old config :

'assetsAutoCompress' => [
    'class'   => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',

    'htmlCompress'                  => true, //Deprecated!!!       
    'htmlCompressOptions'           =>       //Deprecated!!!       
    [
        'extra' => false,      
        'no-comments' => true 
    ],   
],

New config:

'assetsAutoCompress' => [
    'class'   => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
    '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
    ],
],
  • New option maxNumberRows in TylerHtmlCompressor — the maximum number of rows that the formatter runs on
  • Fixed double html conversion
  • Created skeeks\yii2\assetsAuto\formatters\html\MrclayHtmlCompressor
  • Created skeeks\yii2\assetsAuto\formatters\html\TylerHtmlCompressor
  • Added htmlFormatter config option
  • Deprecated htmlCompressOptions config option
  • Deprecated htmlCompress config option
  • Using IFormatter interface
  • Using stable versions of dependencies

1.3.1.2

  • Fixed local read files

1.3.1.1

  • Fixed webroot setting

1.3.1

  • Fixed: https://github.com/skeeks-semenov/yii2-assets-auto-compress/issues/5
  • Fixed: https://github.com/skeeks-semenov/yii2-assets-auto-compress/issues/23
  • Add webroot setting
  • Local read files

1.3.0

  • Changing the subdirectory with the code in /src
  • Fixed https://github.com/skeeks-semenov/yii2-assets-auto-compress/issues/40
  • Using user-agent header
  • Do not use @web and @webroot (using \Yii::$app->assetManager->baseUrl and \Yii::$app->assetManager->basePath)
  • Using yiisoft/yii2-httpclient

1.2.3.1

  • http_code 200

1.2.3

  • Do not connect the js files when all pjax requests.

1.2.2

  • Fixed https://github.com/skeeks-semenov/yii2-assets-auto-compress/issues/6

1.2.1

  • Html compression by default no extra

1.2.0

  • Added html compression

1.1.2

  • fixed bug https://github.com/skeeks-semenov/yii2-assets-auto-compress/issues/7
  • Processing of files with 404 titles

1.1.1

  • fixed bug download css from remoute server

1.1

  • Removed unnecessary settings preloader

1.0.4

  • Added timeout on file reading

1.0.3

  • Ability to insert CSS using js
  • Added ability to enable preloader
  • It adds the ability to transfer files, css bottom of the page

1.0.2

  • Pjax requests should not be exclusion
  • Update composer (use mrclay/minify)

1.0.1

  • Add setting cssCompress

1.0.0

  • Stable release

Михаил (гость)

Комментарий:
Привет! А нет возможности исключать файлы? jquery надо бы отдельно подключать. Иначе ошибка.

Достоинства:
Работает как заявлено, загрузка ускорилась.

Недостатки:
Не нашел как исключить файл из общего сжатого скрипта.


Affichage de 1-1 sur 1 élément.

Tous les commentaires (0)
Sans commentaires

dev-master — 11 déc. 2019 10:34:08 (il y a 2 jours)

dev-issue-51 — 25 mars 2019 12:04:18 (il y a 8 mois)

dev-yii2-httpclient — 15 sept. 2017 23:54:15 (il y a 2 ans)

dev-issues-7 — 6 juil. 2016 13:17:41 (il y a 3 ans)

1.4.2.1 — 11 déc. 2019 10:34:08 (il y a 2 jours)

1.4.2 — 6 avr. 2019 11:33:56 (il y a 8 mois)

1.4.1 — 7 juin 2018 13:04:05 (il y a un an)

1.4.0 — 4 avr. 2018 11:44:24 (il y a un an)

1.3.1.2 — 5 oct. 2017 16:42:22 (il y a 2 ans)

1.3.1.1 — 5 oct. 2017 15:18:41 (il y a 2 ans)

1.3.1 — 5 oct. 2017 14:58:55 (il y a 2 ans)

1.3.1-rc — 5 oct. 2017 14:58:55 (il y a 2 ans)

1.3.0 — 16 sept. 2017 14:43:23 (il y a 2 ans)

1.2.3.1 — 14 juil. 2017 19:55:12 (il y a 2 ans)

1.2.3 — 11 nov. 2016 11:29:19 (il y a 3 ans)

1.2.2 — 11 oct. 2016 00:58:53 (il y a 3 ans)

1.2.1 — 29 juil. 2016 18:27:14 (il y a 3 ans)

1.2.0 — 16 juil. 2016 17:46:02 (il y a 3 ans)

1.1.2 — 16 juil. 2016 08:37:08 (il y a 3 ans)

1.1.1 — 11 févr. 2016 18:27:08 (il y a 3 ans)

1.1.0 — 11 févr. 2016 12:12:57 (il y a 3 ans)

1.0.4 — 10 févr. 2016 14:17:23 (il y a 3 ans)

1.0.3 — 12 août 2015 15:31:50 (il y a 4 ans)

1.0.2 — 9 août 2015 17:00:28 (il y a 4 ans)

1.0.1 — 6 août 2015 11:17:21 (il y a 4 ans)

1.0.0 — 6 août 2015 01:58:30 (il y a 4 ans)

Стандартная установка:

Добавьте composer.json файл вашего проекта:

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

Запустите обновление зависимостей


Читать про обнолвение SkeekS CMS