{% block css %}
{% stylesheets
'assets/vendor/bootstrap/css/bootstrap.min.css'
...
filter='cssrewrite' output='compiled/css/all.css' %}
<link rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}
{% endblock %}
{% block js %}
{% javascripts
'assets/vendor/jquery/jquery.min.js'
...
'assets/js/index.js'
'assets/js/scripts.js'
output='compiled/js/all.js' %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock js %}
rm -rf web/compiled/* && php app/console cache:clear -e=prod --no-warmup && php app/console assetic:dump -e=prod
assetic:
debug: false # %kernel.debug%
use_controller: false
read_from: %kernel.root_dir%/../web
write_to: %kernel.root_dir%/../web
bundles: [TerraKernelBundle, TerraGameBundle] # disable bundles parsing
filters:
cssrewrite: ~
yui_js: { jar: "%kernel.root_dir%/../bin/yuicompressor.jar" }
yui_css: { jar: "%kernel.root_dir%/../bin/yuicompressor.jar" }
assets:
bootstrap_min_css:
inputs:
- %kernel.root_dir%/../vendor/twbs/bootstrap/dist/css/bootstrap.min.css
output: css/bootstrap.min.css
jquery_min_js:
inputs:
- %kernel.root_dir%/../vendor/jquery/jquery/jquery-1.10.2.js
output: js/jquery.min.js
bootstrap_min_js:
inputs:
- %kernel.root_dir%/../vendor/twbs/bootstrap/dist/js/bootstrap.js
- %kernel.root_dir%/../vendor/twbs/bootstrap/js/*.js
output: js/bootstrap.min.js
frontend_min_js:
inputs:
- %kernel.root_dir%/../vendor/jquery/jquery/jquery-1.10.2.js
- %kernel.root_dir%/../vendor/twbs/bootstrap/dist/js/bootstrap.js
- %kernel.root_dir%/../vendor/twbs/bootstrap/js/*.js
- %kernel.root_dir%/../vendor/mopa/bootstrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/public/js/mopabootstrap-collection.js
- '@TerraGameBundle/Resources/public/js/frontend.js'
output: js/frontend.min.js