Sto usando ExposeTranslationBundle (esporre traduzioni a JavaScript) e JMSI18nRoutingBundle (esporre percorsi a JavaScript). Questo fa parte del mio tag <head>
:Come combinare questi asset in Symfony2?
{% javascripts filter='?yui_js' output='js/app.js'
'../app/Resources/public/js/jquery-*.js'
'../app/Resources/public/js/jquery/*'
'../app/Resources/public/js/app.js'
'bundles/fosjsrouting/js/router.js'
'bundles/bazingaexposetranslation/js/translation.js' %}
<script src="{{ asset_url }}" ></script>
{% endjavascripts %}
<!-- ExposeTranslationBundle and JMSI18nRoutingBundle -->
<script src="{{ path('fos_js_routing_js',
{"callback": "fos.Router.setData"}) }}"></script>
<script src="{{ url('bazinga_exposetranslation_js') }}"></script>
è possibile combinare gli ultimi due <script>
importazioni nel primo Assetic e come?
Hai un blocco javascript in un file e le ultime due righe in file diversi? – Axxiss
@Axxiss le ultime due righe provengono da bundle di terze parti. – Polmonino