我遇到了css生成问题
我添加了这样的代码:
<? foreach ($asseticHelper->stylesheets(
array('@AnglerCoreBundle/Resources/public/css/*')
) as $url
): ?>
<link rel="stylesheet" href="<?= $view->escape($url) ?>" />
<? endforeach ?>
在我的layout.html.php的头部和:
<? foreach ($view['assetic']->javascripts(
array(
'@AnglerCoreBundle/Resources/public/js/framework/jquery.js',
'@AnglerCoreBundle/Resources/public/js/framework/json2.js',
'@AnglerBackendBundle/Resources/public/js/hashchange.js',
'@AnglerBackendBundle/Resources/public/js/location.js',
'@AnglerBackendBundle/Resources/public/js/interfaces/*',
'@AnglerBackendBundle/Resources/public/js/page.js',
'@AnglerBackendBundle/Resources/public/js/ui.js',
'@AnglerBackendBundle/Resources/public/js/main.js',
'@AnglerBackendBundle/Resources/public/js/fader.js',
'@AnglerBackendBundle/Resources/public/js/modal.js',
'@AnglerBackendBundle/Resources/public/js/pages/*',
)
) as $url
): ?>
关闭正文标记。问题是当我调用命令时:
app/console clear:cache --env=dev[prod]
app/console assetic:dump
app/console assetic:dump --env=prod --no-debug
app/console assets:install
assetic bundle只生成javascripts,我在两个环境中都看到了它们,但css文件没有。
答案 0 :(得分:0)
您需要添加:
assetic:
bundles: [AnglerCoreBundle, AnglerBackendBundle]