jc-it/yii2-flysystem-asset-manager

Asset manager that uses flysystem for Yii2

v2.0.0 2022-06-15 12:24 UTC

This package is auto-updated.

Last update: 2024-03-15 15:57:24 UTC


README

This extension provides an asset manager that uses flysystem for Yii2.

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require jc-it/yii2-flysystem-asset-manager

or add

"jc-it/yii2-flysystem-asset-manager": "^<latest version>"

to the require section of your composer.json file.

Configuration

...
'components' => [
    'assetFilesystem' => function() {
        return new \League\Flysystem\Filesystem(new \League\Flysystem\Local\LocalFilesystemAdapter(\Yii::getAlias('@webroot/assets')));
    },
    'assetManager' => [
        'class' => \JCIT\components\AssetManager::class,
        'filesystem' => 'assetFilesystem',
    ],
],

TODO

  • Add tests

Credits