PHP code example of soladiem / yii2-assets-minify

1. Go to this page and download the library: Download soladiem/yii2-assets-minify library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

soladiem / yii2-assets-minify example snippets


[
    'bootstrap' => ['AssetsMinify'],
    'components' =>
    [
    //...
        'AssetsMinify' =>
        [
            'class' => '\soladiem\autoMinify\AssetsMinify',
        ],
    //...
    ]
]

enabled = false

excludeFiles = []

$params = array_merge(
    ms.php')
);

return [
    'id' => 'app-backend',
    ...
    ];

$excludeApps = ['app-backend']

$minifyHtmlExcludeApps = true

readfileTimeout = 3

jsMinifyHtml = true

cssMinifyHtml = true

jsCutFlaggedComments = true

cssCutFlaggedComments = true

jsFileCompile = true

cssFileCompile = true

jsFileRemoteCompile = false

cssFileRemoteCompile = false

jsFileCompress = true

cssFileCompress = true

htmlCompress = true

$htmlCompressOptions = [
    'extra' => false,
    'no-comments' => true
];

cssFileBottom = true

cssFileBottomLoadOnJs = false

noIncludeJsFilesOnPjax = true

pathCompileCssFile = 'css'

pathCompileJsFile = 'js'