Symfony2,用于开发环境的assetic中的源路径url

Symfony2,用于开发环境的assetic中的源路径url,symfony,twig,assetic,Symfony,Twig,Assetic,我在twig中有以下代码块: {% javascripts '@CommonBundle/Resources/public/js/*' <script src="{{ asset_url }}"></script> {% endjavascripts %} {%javascripts “@CommonBundle/Resources/public/js/*” {%endjavascripts%} 在dev env中,它以如下方式编译: <script s

我在twig中有以下代码块:

{% javascripts
    '@CommonBundle/Resources/public/js/*'
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{%javascripts
“@CommonBundle/Resources/public/js/*”
{%endjavascripts%}
在dev env中,它以如下方式编译:

<script src="/js/96bb269_part_16_main_1.js"></script>
<script src="/js/96bb269_part_16_mwheelIntent_2.js"></script>
<script src="/js/96bb269_part_16_plugins_3.js"></script>

但我希望dev env的URL中有真实的源路径,如:

<script src="/CommonBundle/Resources/public/js/main.js"></script>
<script src="/CommonBundle/Resources/public/js/test/mwheelIntent.js"></script>
<script src="/CommonBundle/Resources/public/js/foobar/plugins.js"></script>


在这种情况下,输出参数不是解决方案(它适用于孔块,但不适用于每条
行),我只想停止编译dev env的资源URL(或者修改此方法)。我需要做什么?谢谢。

你必须将真正的资源复制到a
web/bundles
dir。为此,请在symfony控制台中使用一些内置的适当命令。

我相信这就是你想要的-你应该将此作为一个答案发布,傻瓜。:)它如何帮助我?我已经有了符号链接。symfony b是如何使用web/bundles dir的tw?请读这本书。也许它会有用