From 9b9b361aff8c060cb6f294bfeb89b36d195e05fe Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Tue, 6 Jan 2015 17:14:23 +0200 Subject: [PATCH] Doc comments for `yii\console\controllers\AssetController` extended --- .../console/controllers/AssetController.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/framework/console/controllers/AssetController.php b/framework/console/controllers/AssetController.php index bc826aa9c2..00fc73bd56 100644 --- a/framework/console/controllers/AssetController.php +++ b/framework/console/controllers/AssetController.php @@ -66,6 +66,37 @@ class AssetController extends Controller * ~~~ * * File names can contain placeholder "{hash}", which will be filled by the hash of the resulting file. + * + * You may specify several target bundles in order to compress different groups of assets. + * In this case you should use 'depends' key to specify, which bundles should be covered with particular + * target bundle. You may leave 'depends' to be empty for single bundle, which will compress all remaining + * bundles in this case. + * For example: + * + * ~~~ + * 'app\config\AllShared' => [ + * 'js' => 'js/all-shared-{hash}.js', + * 'css' => 'css/all-shared-{hash}.css', + * 'depends' => [ + * // Include all assets shared between 'backend' and 'frontend' + * 'yii\web\YiiAsset', + * 'app\assets\SharedAsset', + * ], + * ], + * 'app\config\AllBackEnd' => [ + * 'js' => 'js/all-{hash}.js', + * 'css' => 'css/all-{hash}.css', + * 'depends' => [ + * // Include only 'backend' assets: + * 'app\assets\AdminAsset' + * ], + * ], + * 'app\config\AllFrontEnd' => [ + * 'js' => 'js/all-{hash}.js', + * 'css' => 'css/all-{hash}.css', + * 'depends' => [], // Include all remaining assets + * ], + * ~~~ */ public $targets = []; /**