Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after yii2 combining-compressing-assets _all-skins.min.css link to my project web folder #191

Open
uncle-ben-s opened this issue Sep 27, 2019 · 3 comments

Comments

@uncle-ben-s
Copy link

Hello.
after combining assets
./yii asset assets.php config/assets-prod.php
file /vendor/almasaeed2010/adminlte/dist/css/skins/_all-skins.min.css link to my project web folder /css/skins/_all-skins.min.css but there is no file.

assets.php
`<?php
/**

  • Configuration file for the "yii asset" console command.
    */

// In the console environment, some path aliases may not exist. Please define these:
Yii::setAlias('@webroot', DIR . '/web');
Yii::setAlias('@web', '/');

return [
// Adjust command/callback for JavaScript files compressing:
'jsCompressor' => 'java -jar compiler.jar --js {from} --js_output_file {to}',
// Adjust command/callback for CSS files compressing:
'cssCompressor' => 'java -jar yuicompressor-2.4.8.jar --type css {from} -o {to}',
// Whether to delete asset source after compression:
'deleteSource' => false,
// The list of asset bundles to compress:
'bundles' => [
'admin\assets\AppAsset',
'dmstr\web\AdminLteAsset',
// 'yii\web\YiiAsset',
// 'yii\web\JqueryAsset',
],
// Asset bundle for compression output:
'targets' => [
'all' => [
'class' => 'yii\web\AssetBundle',
'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',
],
];`

maybe I'm doing something wrong?

Thanks!

@schmunk42
Copy link
Member

Which Yii version are you using?
There's a known issue, because skins files are not included in the class definition, but loaded dynamically. I thought this was fixed in Yii itself, but I am unsure.

@uncle-ben-s
Copy link
Author

$ ./yii
This is Yii version 2.0.27.

composer.json
"minimum-stability": "stable",
"require": {
"php": ">=5.6.0",
"yiisoft/yii2": "~2.0.14",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0 || ~2.1.0",
"dmstr/yii2-adminlte-asset": "^2.1",
"fedemotta/yii2-widget-datatables": "",
"kartik-v/yii2-widget-datetimepicker": "
"
},

@schmunk42
Copy link
Member

@eluhr @handcode Did we see similar issues, when bundling assets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants