diff --git a/frontend/assets/config-assets.php b/frontend/assets/config-assets.php new file mode 100644 index 0000000..042d880 --- /dev/null +++ b/frontend/assets/config-assets.php @@ -0,0 +1,49 @@ + 'java -jar compiler.jar --js {from} --js_output_file {to} --warning_level QUIET', + // Adjust command/callback for CSS files compressing: + 'cssCompressor' => 'java -jar yuicompressor.jar --type css {from} -o {to}', + // The list of asset bundles to compress: + 'bundles' => [ + 'frontend\assets\AppAsset', + 'yii\web\YiiAsset', + 'yii\web\JqueryAsset', + 'yii\bootstrap\BootstrapAsset', + 'yii\bootstrap\BootstrapPluginAsset' + ], + // Asset bundle for compression output: + 'targets' => [ + 'allFrontEnd' => [ + 'class' => 'frontend\assets\MyAsset' , + 'basePath' => '@webroot/assets', + 'baseUrl' => '@web/assets', + 'js' => 'js/all-{hash}.js', + 'css' => 'css/all-{hash}.css', + ], + ], + // Asset manager configuration: + 'assetManager' => [ + 'basePath' => '@webroot/assets', + 'baseUrl' => '@web/assets', +// 'bundles' => [ +// 'yii\bootstrap\BootstrapAsset' => [ +// 'basePath' => '@webroot', +// 'baseUrl' => '@web', +// 'sourcePath' => null, +// ], +// 'yii\bootstrap\BootstrapPluginAsset' => [ +// 'basePath' => '@webroot', +// 'baseUrl' => '@web', +// 'sourcePath' => null, +// ] +// ] + ], +]; \ No newline at end of file