credy/yii2-assetconverter

Yii2 assetconverter and minifier written in PHP

1.0.0 2022-10-05 10:59 UTC

This package is auto-updated.

Last update: 2024-12-05 15:41:46 UTC


README

Installation:

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist credy/yii2-assetconverter "^1.0"

or add

"credy/yii2-assetconverter": "^1.0"

to the require section of your composer.json.

Configuration:

AssetController:

put following snippet into your application config

[
    'controllerMap' => [
        'assets' => [
            'class' => credy\assetconverter\controllers\AssetController::class
        ],
    ],
]

Usage:

You can use it exactly as Yii2 AssetController

AssetConverters:

Put following snippet into your application config

[
    'components' => [
        'assetManager' => [
            'converter' => [
                'class' => credy\assetconverter\assetconverters\ChooserAssetConverter::class
            ]
        ]
    ],
];